Skip to content

Commit

Permalink
Merge pull request #19503 from Expensify/bondy-manual-request-paywith…
Browse files Browse the repository at this point in the history
…wallet

Re-adding paywithwallet functionality for manual requests
  • Loading branch information
MariaHCD authored May 25, 2023
2 parents ebc672a + fd4ec91 commit 83555a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,11 @@ function payMoneyRequest(paymentType, chatReport, iouReport) {
};
const {params, optimisticData, successData, failureData} = getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentType);

API.write('PayMoneyRequest', params, {optimisticData, successData, failureData});
// For now we need to call the PayMoneyRequestWithWallet API since PayMoneyRequest was not updated to work with
// Expensify Wallets.
const apiCommand = paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY ? 'PayMoneyRequestWithWallet' : 'PayMoneyRequest';

API.write(apiCommand, params, {optimisticData, successData, failureData});
Navigation.navigate(ROUTES.getReportRoute(chatReport.reportID));
if (paymentType === CONST.IOU.PAYMENT_TYPE.PAYPAL_ME) {
asyncOpenURL(Promise.resolve(), buildPayPalPaymentUrl(iouReport.total, recipient.payPalMeAddress, iouReport.currency));
Expand Down

0 comments on commit 83555a9

Please sign in to comment.