fix(currency): use narrow symbol so non-EN locales show $ not USD#616
Conversation
Why: Intl.NumberFormat defaults to disambiguated forms (e.g. "1,23 USD" in it-IT) because "$" is ambiguous outside the US. The wider "USD" glyph overflows in several balance/price components. currencyDisplay: 'narrowSymbol' forces the compact symbol while preserving locale number grouping and symbol placement. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: -2.41 kB (-0.03%) Total Size: 8.47 MB
ℹ️ View Unchanged
|
Summary
Intl.NumberFormatin non-US locales (e.g.it-IT) renders USD as"1,23 USD"because$is ambiguous outside the US. The widerUSDglyph overflows several balance/price components.currencyDisplay: 'narrowSymbol'informatCurrencyValueso the compact symbol is used regardless of locale, while locale number grouping and symbol placement are preserved.formatCurrencyValue/formatCompactCurrency(AssetButton, useTotalBalance, AssetsHeader, TokenDetailContent, …).Before / after
it-IT1,23 USD1,23 $de-DE1,23 €1,23 €(unchanged)en-US$1.23$1.23(unchanged)Test plan
$and no longer overflow.€/£across locales.🤖 Generated with Claude Code