Skip to content

Commit 3c079ee

Browse files
authored
Merge pull request Expensify#69123 from s77rt/fallback-bankname
Search: Fallback to generic bank name if given a an unknown bankName
2 parents 8123b7d + 2a2bd6f commit 3c079ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/SelectionList/Search/WithdrawalIDListItemHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function WithdrawalIDListItemHeader<TItem extends ListItem>({
4343
const {translate} = useLocalize();
4444
const {isLargeScreenWidth} = useResponsiveLayout();
4545
const {icon, iconSize, iconStyles} = getBankIcon({bankName: withdrawalIDItem.bankName, styles});
46-
const formattedBankName = CONST.BANK_NAMES_USER_FRIENDLY[withdrawalIDItem.bankName];
46+
const formattedBankName = CONST.BANK_NAMES_USER_FRIENDLY[withdrawalIDItem.bankName] ?? CONST.BANK_NAMES_USER_FRIENDLY[CONST.BANK_NAMES.GENERIC_BANK];
4747
const formattedWithdrawalDate = DateUtils.formatWithUTCTimeZone(
4848
withdrawalIDItem.debitPosted,
4949
DateUtils.doesDateBelongToAPastYear(withdrawalIDItem.debitPosted) ? CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT : CONST.DATE.MONTH_DAY_ABBR_FORMAT,

0 commit comments

Comments
 (0)