( amount: CurrencyAmount<Currency>, locale: SupportedLocale = DEFAULT_LOCALE )
| 663 | const MAX_AMOUNT_STR_LENGTH = 9 |
| 664 | |
| 665 | function formatReviewSwapCurrencyAmount( |
| 666 | amount: CurrencyAmount<Currency>, |
| 667 | locale: SupportedLocale = DEFAULT_LOCALE |
| 668 | ): string { |
| 669 | let formattedAmount = formatCurrencyAmount({ amount, type: NumberType.TokenTx, locale }) |
| 670 | if (formattedAmount.length > MAX_AMOUNT_STR_LENGTH) { |
| 671 | formattedAmount = formatCurrencyAmount({ amount, type: NumberType.SwapTradeAmount, locale }) |
| 672 | } |
| 673 | return formattedAmount |
| 674 | } |
| 675 | |
| 676 | export function useFormatterLocales(): { |
| 677 | formatterLocale: SupportedLocale |
no test coverage detected
searching dependent graphs…