Skip to content

Commit

Permalink
Merge pull request #29118 from s-alves10/fix/issue-28380
Browse files Browse the repository at this point in the history
fix: default merchant for money request with receipt
  • Loading branch information
bondydaa authored Oct 12, 2023
2 parents 54109b6 + b2b9923 commit 6f533d6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,13 @@ function buildOptimisticTransaction(
commentJSON.originalTransactionID = originalTransactionID;
}

// For the SmartScan to run successfully, we need to pass the merchant field empty to the API
const defaultMerchant = !receipt || Object.keys(receipt).length === 0 ? CONST.TRANSACTION.DEFAULT_MERCHANT : '';

return {
transactionID,
amount,
currency,
reportID,
comment: commentJSON,
merchant: merchant || defaultMerchant,
merchant: merchant || CONST.TRANSACTION.DEFAULT_MERCHANT,
created: created || DateUtils.getDBTime(),
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
receipt,
Expand Down

0 comments on commit 6f533d6

Please sign in to comment.