Skip to content

Token metadata display (symbol + decimals) in the dashboard #8

Description

@gbengaeben

Category: Frontend UX | Priority: Low | Dependencies: none | Out of scope: token logos, price conversion

Description & Context: Roadmap item. Streams show raw base units (stroops) — "1,000,000,000" vs "1,000" is indistinguishable. Read symbol()/decimals() from the SEP-41 token contract.

Acceptance Criteria / DoD:

  • getTokenMetadata(token) in frontend/src/lib/contracts/ (read-only contract call to symbol/decimals), cached per token address (module-level Map)
  • format.ts gains formatAmount(baseUnits, decimals); all amount displays use symbol + formatted value, falling back to raw units when metadata is unavailable (e.g., RPC down)
  • tsc -b clean

How to verify: Create a stream in a non-native SAC token — the card shows e.g. 1,000.0000000 USDC instead of 10000000000.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend (React/Vite/TS)uxUser experience

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions