Skip to content

Commit

Permalink
Merge pull request #45574 from nkdengineer/fix/42120-regression
Browse files Browse the repository at this point in the history
fix: remove receipt when upload fail
  • Loading branch information
aldo-expensify authored Jul 17, 2024
2 parents 1ca0bf7 + f1d9417 commit 43d4643
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6813,13 +6813,12 @@ function replaceReceipt(transactionID: string, file: File, source: string) {
},
},
];

const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
value: {
receipt: oldReceipt,
receipt: !isEmptyObject(oldReceipt) ? oldReceipt : null,
filename: transaction?.filename,
errors: getReceiptError(receiptOptimistic, file.name),
},
Expand Down

0 comments on commit 43d4643

Please sign in to comment.