MCPcopy
hub / github.com/Uniswap/interface / formatFiatPrice

Function formatFiatPrice

src/utils/formatNumbers.ts:653–661  ·  view source on GitHub ↗
({
  price,
  type = NumberType.FiatTokenPrice,
  locale,
  localCurrency,
  conversionRate,
}: FormatFiatPriceOptions)

Source from the content-addressed store, hash-verified

651}
652
653function formatFiatPrice({
654 price,
655 type = NumberType.FiatTokenPrice,
656 locale,
657 localCurrency,
658 conversionRate,
659}: FormatFiatPriceOptions): string {
660 return formatNumberOrString({ input: price, type, locale, localCurrency, conversionRate })
661}
662
663const MAX_AMOUNT_STR_LENGTH = 9
664

Callers 5

ChartHeaderFunction · 0.85
TokenRowFunction · 0.85
TokenRow.tsxFile · 0.85
useFormatterFunction · 0.85

Calls 1

formatNumberOrStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…