Skip to content

Commit

Permalink
fix(ffe-account-selector-react): format account number in drodown
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hellstrand committed Nov 28, 2024
1 parent bad74d1 commit 8b3e4c5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import React, { AriaAttributes, useState } from 'react';
import classNames from 'classnames';
import { AccountDetails } from './AccountDetails';
import { Account, Locale } from '../types';
import { balanceWithCurrency, formatIncompleteAccountNumber } from '../format';
import {
balanceWithCurrency,
formatIncompleteAccountNumber,
accountFormatter,
} from '../format';
import { SearchableDropdown } from '@sb1/ffe-searchable-dropdown-react';
import { getAccountsWithCustomAccounts } from './getAccountsWithCustomAccounts';
import { searchMatcherIgnoringAccountNumberFormatting } from '../searchMatcherIgnoringAccountNumberFormatting';
Expand Down Expand Up @@ -126,6 +130,7 @@ export const AccountSelector = <T extends Account = Account>({

const dropdownListAccounts = accounts.map(it => ({
...it,
accountNumber: accountFormatter(it.accountNumber),
balance: OptionBody
? it.balance
: balanceWithCurrency(it.balance, locale, it.currencyCode),
Expand Down

0 comments on commit 8b3e4c5

Please sign in to comment.