From 8b78aa1fe8b1b1e032c4eb385b17c9e7fcdb4a8a Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Wed, 19 Jul 2023 16:56:17 -0700 Subject: [PATCH 1/3] Send debtor accountID in RequestMoney --- src/libs/actions/IOU.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index e480120a7323..3d66d8e2b511 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -411,6 +411,7 @@ function requestMoney(report, amount, currency, payeeEmail, payeeAccountID, part 'RequestMoney', { debtorEmail: payerEmail, + debtorAccountID: payerAccountID, amount, currency, comment, From d1b15ea7a3e80ba4130efc936d468be1d70d622b Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Tue, 5 Sep 2023 15:31:24 -0700 Subject: [PATCH 2/3] Pass payer account id --- src/libs/actions/IOU.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 780222d3060c..8b6175625cda 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -480,6 +480,7 @@ function getMoneyRequestInformation( ); return { + payerAccountID, payerEmail, iouReport, chatReport, @@ -554,7 +555,7 @@ function createDistanceRequest(report, participant, comment, created, transactio * @param {Object} [receipt] */ function requestMoney(report, amount, currency, created, merchant, payeeEmail, payeeAccountID, participant, comment, receipt = undefined) { - const {payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation( + const {payerAccountID, payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation( report, participant, comment, From ccbc4063910cf88f2c90c3c9fa0c9a28dcb75b09 Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Tue, 19 Sep 2023 15:39:13 +0800 Subject: [PATCH 3/3] Prettier --- src/libs/actions/IOU.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 4cc17591aca1..e6af7b1fce05 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -610,21 +610,8 @@ function requestMoney(report, amount, currency, created, merchant, payeeEmail, p // 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 {payerAccountID, payerEmail, iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation( - currentChatReport, - participant, - comment, - amount, - currency, - created, - merchant, - payeeAccountID, - payeeEmail, - receipt, - undefined, - category, - 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, billable); API.write( 'RequestMoney',