Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkiWines committed Dec 3, 2023
1 parent 3430a75 commit 10aef7c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/Icon/BankIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,15 @@ function getAssetIcon(bankNameKey: BankNameKey, isCard: boolean): React.FC<SvgPr

function getBankNameKey(bankName: string): BankNameKey {
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);
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) ?? '';
}
Expand Down

0 comments on commit 10aef7c

Please sign in to comment.