Skip to content

Commit

Permalink
fix: reset transaction thread on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Feb 9, 2024
1 parent 4c49adf commit 084a25c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,15 @@ function getUpdateMoneyRequestParams(
});
}

if (transactionThread) {
// Reset the transaction thread to its original state
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID}`,
value: transactionThread,
});
}

return {
params,
onyxData: {optimisticData, successData, failureData},
Expand Down

0 comments on commit 084a25c

Please sign in to comment.