From 36770730794fdfd53fab4ad383d832d2b15fefc5 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 7 Jan 2025 23:06:31 +0000 Subject: [PATCH] improve normalizeAccount --- src/app-gocardless/banks/integration-bank.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app-gocardless/banks/integration-bank.js b/src/app-gocardless/banks/integration-bank.js index 2b4f358e3..c96b08501 100644 --- a/src/app-gocardless/banks/integration-bank.js +++ b/src/app-gocardless/banks/integration-bank.js @@ -38,10 +38,14 @@ export default { institution: account.institution, mask: (account?.iban || '0000').slice(-4), iban: account?.iban || null, - name: [account.name, printIban(account), account.currency] + name: [ + account.name ?? account.displayName ?? account.product, + printIban(account), + account.currency, + ] .filter(Boolean) .join(' '), - official_name: `integration-${account.institution_id}`, + official_name: account.product ?? `integration-${account.institution_id}`, type: 'checking', }; },