({
amount,
type = NumberType.TokenNonTx,
placeholder,
locale = DEFAULT_LOCALE,
localCurrency = DEFAULT_LOCAL_CURRENCY,
conversionRate,
}: FormatCurrencyAmountOptions)
| 516 | } |
| 517 | |
| 518 | function formatCurrencyAmount({ |
| 519 | amount, |
| 520 | type = NumberType.TokenNonTx, |
| 521 | placeholder, |
| 522 | locale = DEFAULT_LOCALE, |
| 523 | localCurrency = DEFAULT_LOCAL_CURRENCY, |
| 524 | conversionRate, |
| 525 | }: FormatCurrencyAmountOptions): string { |
| 526 | return formatNumber({ |
| 527 | input: amount ? parseFloat(amount.toSignificant()) : undefined, |
| 528 | type, |
| 529 | placeholder, |
| 530 | locale, |
| 531 | localCurrency, |
| 532 | conversionRate, |
| 533 | }) |
| 534 | } |
| 535 | |
| 536 | function formatPercent(percent: Percent | undefined, locale: SupportedLocale = DEFAULT_LOCALE) { |
| 537 | if (!percent) return '-' |
no test coverage detected
searching dependent graphs…