Skip to content

[Frontend] TransactionTracker re-implements formatAmount locally — use shared util #571

Description

@ogazboiz

Telegram: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

frontend/src/components/TransactionTracker.tsx defines its own private formatAmount(raw, decimals) at the bottom of the file, duplicating the canonical helper that already exists in lib/amount.ts / utils/amount.ts. This is a third copy of the same i128→display logic and can drift (e.g. its BigInt(10 ** decimals) differs from the 10n ** BigInt(decimals) form used elsewhere, which is fine for 7 but fragile).

Acceptance criteria

  • Import formatAmount from the shared amount util instead of the local copy
  • Delete the local formatAmount definition
  • Component renders identically; tests pass

Files to touch

  • frontend/src/components/TransactionTracker.tsx

Out of scope

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programfrontendFrontend related tasksgood first issueGood for newcomersrefactorRefactoring existing code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions