({
price,
atLimit,
direction,
placeholder,
numberType,
locale,
localCurrency,
conversionRate,
}: FormatTickPriceOptions)
| 589 | } |
| 590 | |
| 591 | function formatTickPrice({ |
| 592 | price, |
| 593 | atLimit, |
| 594 | direction, |
| 595 | placeholder, |
| 596 | numberType, |
| 597 | locale, |
| 598 | localCurrency, |
| 599 | conversionRate, |
| 600 | }: FormatTickPriceOptions) { |
| 601 | if (atLimit[direction]) { |
| 602 | return direction === Bound.LOWER ? '0' : '∞' |
| 603 | } |
| 604 | |
| 605 | if (!price && placeholder !== undefined) { |
| 606 | return placeholder |
| 607 | } |
| 608 | |
| 609 | return formatPrice({ price, type: numberType ?? NumberType.TokenNonTx, locale, localCurrency, conversionRate }) |
| 610 | } |
| 611 | |
| 612 | interface FormatNumberOrStringOptions { |
| 613 | input: Nullish<number | string> |
no test coverage detected
searching dependent graphs…