From 901df70807f5e3761f3d3a51de1266f9c791a0bd Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 9 Jan 2024 16:45:15 +0800 Subject: [PATCH] revert the report when fails to pay --- src/libs/actions/IOU.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 75ae60970451..7ef1eb856ffe 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -3020,6 +3020,16 @@ function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMetho }, }, }, + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: iouReport, + }, + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`, + value: chatReport, + }, ]; if (!_.isNull(currentNextStep)) {