Skip to content

Conversation

@paanSinghCoder
Copy link
Contributor

@paanSinghCoder paanSinghCoder commented Jan 29, 2026

Screenshot 2026-01-29 at 4 49 52 PM

Summary

Issue:

  • Values like -595 were shown as -,595 because the minus sign was included in the length used for comma placement, so a comma was inserted after the sign.
  • Values like -0.595 were shown as -0.,595 because commas were applied to the whole string (including the fractional part) instead of only the integer part.

Fix:

  • Sign: Strip a leading -, format only the numeric part, then prepend the sign again so commas are never placed after the minus.
  • Split on . and apply comma formatting only to the integer part; append the decimal part unchanged so fractional digits are preserved and no commas appear after the decimal point.

Changes

The custom getFormattedNumberString in frontier/web/lib/react/utils/index.ts was kept (instead of switching to Intl.NumberFormat) so that:

  • All decimal digits from num.toString() are preserved (no rounding or truncation).
  • Behavior matches the previous contract for token balance and other numeric displays.

Test Plan

  • Manually tested
  • Build and type checking passes

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
frontier Ready Ready Preview, Comment Jan 29, 2026 11:09am

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21475828595

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.882%

Totals Coverage Status
Change from base Build 21471293521: 0.0%
Covered Lines: 15887
Relevant Lines: 41938

💛 - Coveralls

@paanSinghCoder paanSinghCoder self-assigned this Jan 29, 2026
@paanSinghCoder paanSinghCoder added Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. and removed Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. labels Jan 29, 2026
@rohilsurana rohilsurana requested a review from rsbh January 29, 2026 12:25
@paanSinghCoder paanSinghCoder marked this pull request as ready for review January 29, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants