Skip to content

Commit

Permalink
Merge pull request #31292 from DylanDylann/fix/30856
Browse files Browse the repository at this point in the history
Fix: Update total amount in optimistic data
  • Loading branch information
Li357 authored Nov 21, 2023
2 parents 689338c + 36c3c23 commit 2fa90eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -2445,7 +2445,7 @@ function getSendMoneyParams(report, amount, currency, comment, paymentMethodType
function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMethodType) {
const optimisticIOUReportAction = ReportUtils.buildOptimisticIOUReportAction(
CONST.IOU.REPORT_ACTION_TYPE.PAY,
iouReport.total,
-iouReport.total,
iouReport.currency,
'',
[recipient],
Expand Down
2 changes: 1 addition & 1 deletion tests/actions/IOUTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ describe('actions/IOU', () => {
}),
]),
originalMessage: expect.objectContaining({
amount,
amount: -amount,
paymentType: CONST.IOU.PAYMENT_TYPE.VBBA,
type: 'pay',
}),
Expand Down

0 comments on commit 2fa90eb

Please sign in to comment.