Skip to content

Commit

Permalink
Merge pull request #47216 from dominictb/fix/43579-regression
Browse files Browse the repository at this point in the history
fix: update transaction filename in getTrackExpenseInformation
  • Loading branch information
bondydaa authored Aug 14, 2024
2 parents be91230 + 52a5f2e commit 122caae
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 122caae

Please sign in to comment.