From 1957f404c0d325bbe400a59b1c3b54955b5737b3 Mon Sep 17 00:00:00 2001 From: "Bruno Rocha (via MelvinBot)" Date: Tue, 12 May 2026 16:39:49 +0000 Subject: [PATCH] Add successData for split parent transaction reportID When a card expense is split, the parent transaction's reportID is optimistically set to SPLIT_REPORT_ID ('-2') to hide it from the report. There was optimisticData and failureData for this, but no successData to confirm the change after server response. This caused server/Pusher data to overwrite the optimistic value, making the parent reappear alongside split children and double-counting the total. Co-authored-by: Bruno Rocha --- src/libs/actions/IOU/SplitTransactionUpdate.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libs/actions/IOU/SplitTransactionUpdate.ts b/src/libs/actions/IOU/SplitTransactionUpdate.ts index 7f3798d0889b..6c06e18b5084 100644 --- a/src/libs/actions/IOU/SplitTransactionUpdate.ts +++ b/src/libs/actions/IOU/SplitTransactionUpdate.ts @@ -1086,6 +1086,14 @@ function updateSplitTransactions({ value: originalTransaction ?? null, }); + onyxData.successData?.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.TRANSACTION}${originalTransactionID}`, + value: { + reportID: CONST.REPORT.SPLIT_REPORT_ID, + }, + }); + if (firstIOU) { const updatedReportAction = { [firstIOU.reportActionID]: {