Skip to content

Commit

Permalink
fix: remove receipt when upload fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jul 17, 2024
1 parent 52b8fdd commit f1d9417
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 f1d9417

Please sign in to comment.