Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/libs/TransactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,13 @@ function buildOptimisticTransaction(
commentJSON.originalTransactionID = originalTransactionID;
}

// For the SmartScan to run successfully, we need to pass the merchant field empty to the API

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you test all types of money requests?
As comment says, it might break scan request flow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@situchan

Scan request works fine. What I fixed is an optimistic data. API is still called with an empty merchant.

@situchan situchan Oct 10, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s-alves10 this was added in #25924
Let's again make sure that revert of that doesn't break anything

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working fine. And it's just optimistic data change

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