From fd4ec9100495f66b8c4c042c82fdc66798705d47 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Wed, 24 May 2023 11:44:24 -0600 Subject: [PATCH] move logic for API switching into the action since this is needed to be called in at least 3 places --- src/pages/iou/IOUDetailsModal.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js index 603011edb2a5..84de2a089242 100644 --- a/src/pages/iou/IOUDetailsModal.js +++ b/src/pages/iou/IOUDetailsModal.js @@ -133,16 +133,6 @@ class IOUDetailsModal extends Component { return reportActionWithPendingAction ? reportActionWithPendingAction.pendingAction : undefined; } - onPressSettlementButton(paymentMethodType) { - // Payment via Expensify Wallet is handled differently for now so make sure we call the right API - if (paymentMethodType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) { - IOU.payMoneyRequestWithWallet(this.props.chatReport, this.props.iouReport, recipient); - return; - } - - IOU.payMoneyRequest(paymentMethodType, this.props.chatReport, this.props.iouReport) - } - render() { const sessionEmail = lodashGet(this.props.session, 'email', null); const pendingAction = this.findPendingAction(); @@ -185,7 +175,7 @@ class IOUDetailsModal extends Component { {hasOutstandingIOU && this.props.iouReport.managerEmail === sessionEmail && ( IOU.payMoneyRequest(paymentMethodType, this.props.chatReport, this.props.iouReport)} shouldShowPaypal={Boolean(lodashGet(this.props, 'iouReport.submitterPayPalMeAddress'))} currency={lodashGet(this.props, 'iouReport.currency')} enablePaymentsRoute={ROUTES.IOU_DETAILS_ENABLE_PAYMENTS}