File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -816,12 +816,9 @@ function getReportFromHoldRequestsOnyxData({
816816
817817 const isApprovalEnabled = policy ? policy . approvalMode && policy . approvalMode !== CONST . POLICY . APPROVAL_MODE . OPTIONAL : false ;
818818
819- // After the held transactions are reassigned to the new hold report, the original iouReport
820- // only contains the previously-unheld transactions. Its total/nonReimbursableTotal must be
821- // updated optimistically so that offline consumers (e.g. the Pay button label computed from
822- // report.total via getMoneyRequestSpendBreakdown) reflect the new remaining amount instead
823- // of the stale pre-move total. unheldTotal is intentionally left unchanged because it already
824- // equals the new total once all remaining transactions on this report are unheld.
819+ // Held transactions just moved out, leaving total/nonReimbursableTotal stale on this report —
820+ // offline consumers (e.g. the Pay button) would read the wrong amount until server reconciles.
821+ // unheldTotal stays as-is: every remaining transaction is unheld, so it already equals the new total.
825822 const shouldUpdateOriginalReportTotals = holdTransactions . length > 0 && iouReport ?. unheldTotal !== undefined ;
826823
827824 const optimisticData : Array < OnyxUpdate < typeof ONYXKEYS . COLLECTION . REPORT | typeof ONYXKEYS . COLLECTION . REPORT_ACTIONS | typeof ONYXKEYS . COLLECTION . TRANSACTION > > = [
You can’t perform that action at this time.
0 commit comments