Skip to content

Commit

Permalink
improve normalizeAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd committed Jan 7, 2025
1 parent 348eff3 commit 3677073
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app-gocardless/banks/integration-bank.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
},
Expand Down

0 comments on commit 3677073

Please sign in to comment.