Skip to content

Commit

Permalink
fix: update transaction filename in getTrackExpenseInformation
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Aug 12, 2024
1 parent e7fe622 commit 52a5f2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,9 @@ function getTrackExpenseInformation(
filename = receipt.name;
}
const existingTransaction = allTransactionDrafts[`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${existingTransactionID ?? CONST.IOU.OPTIMISTIC_TRANSACTION_ID}`];
if (!filename) {
filename = existingTransaction?.filename;
}
const isDistanceRequest = existingTransaction && existingTransaction.iouRequestType === CONST.IOU.REQUEST_TYPE.DISTANCE;
let optimisticTransaction = TransactionUtils.buildOptimisticTransaction(
ReportUtils.isExpenseReport(iouReport) ? -amount : amount,
Expand Down

0 comments on commit 52a5f2e

Please sign in to comment.