Skip to content

Commit

Permalink
Merge pull request #23225 from Expensify/aldo_use-account-id-to-reque…
Browse files Browse the repository at this point in the history
…st-money

Send debtor accountID in RequestMoney
  • Loading branch information
nkuoch authored Sep 25, 2023
2 parents 5217721 + 70b4dd8 commit 964da42
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ function getMoneyRequestInformation(
);

return {
payerAccountID,
payerEmail,
iouReport,
chatReport,
Expand Down Expand Up @@ -665,27 +666,14 @@ function requestMoney(
// If the report is iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function
const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);
const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report;
const {payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation(
currentChatReport,
participant,
comment,
amount,
currency,
created,
merchant,
payeeAccountID,
payeeEmail,
receipt,
undefined,
category,
tag,
billable,
);
const {payerAccountID, payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} =
getMoneyRequestInformation(currentChatReport, participant, comment, amount, currency, created, merchant, payeeAccountID, payeeEmail, receipt, undefined, category, tag, billable);

API.write(
'RequestMoney',
{
debtorEmail: payerEmail,
debtorAccountID: payerAccountID,
amount,
currency,
comment,
Expand Down

0 comments on commit 964da42

Please sign in to comment.