Skip to content

Commit

Permalink
fix: update lastActorAccountID for transactionThread
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Feb 9, 2024
1 parent 9463e22 commit 4c49adf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ function getUpdateMoneyRequestParams(
});
}

// Optimistically modify the transaction
// Optimistically modify the transaction and the transaction thread
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
Expand All @@ -1119,6 +1119,14 @@ function getUpdateMoneyRequestParams(
},
});

optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID}`,
value: {
lastActorAccountID: updatedReportAction.actorAccountID,
},
});

if (isScanning && ('amount' in transactionChanges || 'currency' in transactionChanges)) {
optimisticData.push(
{
Expand Down

0 comments on commit 4c49adf

Please sign in to comment.