diff --git a/packages/ffe-account-selector-react/src/account-selector/AccountDetails.tsx b/packages/ffe-account-selector-react/src/account-selector/AccountDetails.tsx index 208301572c..dfeba24cbd 100644 --- a/packages/ffe-account-selector-react/src/account-selector/AccountDetails.tsx +++ b/packages/ffe-account-selector-react/src/account-selector/AccountDetails.tsx @@ -32,7 +32,7 @@ export function AccountDetails({ {account && ( <>
- {accountFormatter(accountNumber)} + {accountFormatter(accountNumber?.replace(/\s/g, ''))}
{showBalance && (
diff --git a/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx b/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx index 5ddf8e40f4..feaee9bab9 100644 --- a/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx +++ b/packages/ffe-account-selector-react/src/account-selector/AccountSelector.tsx @@ -7,6 +7,7 @@ import { SearchableDropdown } from '@sb1/ffe-searchable-dropdown-react'; import { getAccountsWithCustomAccounts } from './getAccountsWithCustomAccounts'; import { searchMatcherIgnoringAccountNumberFormatting } from '../searchMatcherIgnoringAccountNumberFormatting'; import { texts } from '../texts'; +import { formatAccountNumber as formatAccountNumberFFE } from '@sb1/ffe-formatters'; export interface AccountSelectorProps { /** @@ -126,6 +127,9 @@ export const AccountSelector = ({ const dropdownListAccounts = accounts.map(it => ({ ...it, + accountNumber: formatAccountNumberFFE( + it.accountNumber.replace(/\s/g, ''), + ), balance: OptionBody ? it.balance : balanceWithCurrency(it.balance, locale, it.currencyCode),