diff --git a/src/CONST.ts b/src/CONST.ts index 13b79179f431..43921d9a4457 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -2873,6 +2873,7 @@ const CONST = { FIDELITY: 'fidelity', GENERIC_BANK: 'generic bank', HUNTINGTON_BANK: 'huntington bank', + HUNTINGTON_NATIONAL: 'huntington national', NAVY_FEDERAL_CREDIT_UNION: 'navy federal credit union', PNC: 'pnc', REGIONS_BANK: 'regions bank', diff --git a/src/components/Icon/BankIcons.ts b/src/components/Icon/BankIcons.ts index 81e9075091c6..ece9a865629b 100644 --- a/src/components/Icon/BankIcons.ts +++ b/src/components/Icon/BankIcons.ts @@ -62,6 +62,9 @@ function getAssetIcon(bankNameKey: BankNameKey, isCard: boolean): React.FC) : (require('@assets/images/bankicons/huntington-bank.svg').default as React.FC), + [CONST.BANK_NAMES.HUNTINGTON_NATIONAL]: isCard + ? (require('@assets/images/cardicons/huntington-bank.svg').default as React.FC) + : (require('@assets/images/bankicons/huntington-bank.svg').default as React.FC), [CONST.BANK_NAMES.NAVY_FEDERAL_CREDIT_UNION]: isCard ? (require('@assets/images/cardicons/navy-federal-credit-union.svg').default as React.FC) : (require('@assets/images/bankicons/navy-federal-credit-union.svg').default as React.FC), @@ -95,7 +98,17 @@ function getAssetIcon(bankNameKey: BankNameKey, isCard: boolean): React.FC value?.toLowerCase() === bankName); + const bank = Object.entries(CONST.BANK_NAMES).find(([, value]) => { + const condensedValue = value.replace(/\s/g, ''); + return ( + bankName === value || + bankName.includes(value) || + bankName.startsWith(value) || + bankName === condensedValue || + bankName.includes(condensedValue) || + bankName.startsWith(condensedValue) + ); + }); return (bank?.[0] as BankNameKey) ?? ''; }