Skip to content

3. Add lib/utils/format.ts number formatting #362

Description

@DeFiVC

What: Add number formatting utilities for displaying token amounts, percentages, and large numbers.

Why: Numbers need consistent formatting (1,234.56 LEARN, 75%, 1.2K users). Ad-hoc formatting is inconsistent.

Scope: Add functions for: formatTokenAmount, formatPercentage, formatLargeNumber, formatAddress. Use Intl.NumberFormat where possible.

Acceptance criteria:

  • Token amounts are formatted
  • Percentages are formatted
  • Large numbers are abbreviated
  • Addresses are truncated

Technical context: src/lib/utils/format.ts — format utils. src/components/wallet/balance-display.tsx — balance display.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions