From a9fd9194dfe272d7f5cd1ff6bf58c39da1ef48d9 Mon Sep 17 00:00:00 2001 From: Youssef Lourayad Date: Fri, 16 Feb 2024 14:48:54 +0100 Subject: [PATCH] Merge pull request #36631 from Expensify/alberto-redDot Set the error correctly on payment cancellation (cherry picked from commit 28a1ccc40ad6345338de1951c02146304fb30cd5) --- src/libs/actions/IOU.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 78ecd5a4f664..6dab37b98ee3 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3672,7 +3672,7 @@ function cancelPayment(expenseReport: OnyxTypes.Report, chatReport: OnyxTypes.Re onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${expenseReport.reportID}`, value: { - [expenseReport.reportActionID ?? '']: { + [optimisticReportAction.reportActionID ?? '']: { errors: ErrorUtils.getMicroSecondOnyxError('iou.error.other'), }, },