diff --git a/src/components/TransactionItemRow/index.tsx b/src/components/TransactionItemRow/index.tsx index 7bed78327133..7907573258b5 100644 --- a/src/components/TransactionItemRow/index.tsx +++ b/src/components/TransactionItemRow/index.tsx @@ -25,10 +25,9 @@ import { getCreated as getTransactionCreated, getTransactionPendingAction, hasMissingSmartscanFields, - hasReceipt, isAmountMissing, isMerchantMissing, - isReceiptBeingScanned, + isScanning, isTransactionPendingDelete, } from '@libs/TransactionUtils'; import variables from '@styles/variables'; @@ -112,11 +111,13 @@ function getMerchantNameWithFallback(transactionItem: TransactionWithOptionalSea if (merchantNameEmpty && shouldUseNarrowLayout) { merchantOrDescriptionToDisplay = Parser.htmlToText(description); } + let merchant = shouldShowMerchant ? merchantOrDescriptionToDisplay : Parser.htmlToText(description); - if (hasReceipt(transactionItem) && isReceiptBeingScanned(transactionItem) && shouldShowMerchant) { + if (isScanning(transactionItem) && shouldShowMerchant) { merchant = translate('iou.receiptStatusTitle'); } + const merchantName = StringUtils.getFirstLine(merchant); return merchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT ? merchantName : ''; }