[#960] Price subscript notation for small USD values#967
Conversation
…ll USD prices Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The PR is close, but the new shared subscript formatter breaks for prices with 10 or more leading zeros after the decimal. In those cases it emits non-digit Unicode characters instead of valid subscript digits, so the display no longer matches the requested Mint Club-style format.
Findings
- [high]
formatSubscriptPrice()only supports a single subscript digit.String.fromCharCode(0x2080 + leadingZeros)works for 0-9, but for 10+ leading zeros it produces unrelated characters (₊,₋,ₓ, etc.). Example:0.0000000000601renders as$0.0₊6010instead of a valid multi-digit subscript count. The repo already has a correct multi-digit mapping pattern insrc/hooks/useTokenInfo.ts.- File:
lib/format.ts:47 - Suggestion: Convert
leadingZerosto a string and map each digit to its subscript equivalent before joining, rather than deriving a single code point.
- File:
Decision
Requesting changes because this is a user-visible formatting bug in the new shared helper and would still violate the acceptance criteria for sufficiently small USD values.
…= 10 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The re-review addresses the blocking formatter bug. Multi-digit leading-zero counts now render as proper digit-by-digit subscripts, so the shared helper matches the intended Mint Club-style format for very small USD values.
Findings
- No blocking findings.
Decision
Approving because the previous correctness issue in lib/format.ts is fixed and the change now satisfies the requested subscript-zero formatting behavior across the touched USD displays. CI checks were still pending at review time.
Summary
formatSubscriptPrice()utility inlib/format.tsthat renders small decimals as$0.0₄6262(subscript-zero notation, matching Mint Club style)toExponential()calls inPriceChart.tsx(formatUsdPriceandformatReservePrice) with subscript notationformatUsdTokenPrice()inlib/usd-price.tsto use the same shared formatterFixes #960
Test plan
🤖 Generated with Claude Code