Skip to content

fix: centralize exact amount formatting - #751

Open
SmashRex wants to merge 2 commits into
DigiNodes:mainfrom
SmashRex:feat/625-exact-amount-formatting
Open

SmashRex wants to merge 2 commits into
DigiNodes:mainfrom
SmashRex:feat/625-exact-amount-formatting

Conversation

@SmashRex

@SmashRex SmashRex commented Oct 19, 2026 •

Copy link
Copy Markdown

Linked task

Closes #625

Head SHA reviewed: bd17a70843de55e69707a670b05633f801caa9c7

Summary

Centralizes exact token amount and basis-point formatting across the affected frontend components.

  • Uses integer-based arithmetic for raw token amounts and BPS formatting.
  • Preserves exact token precision for review and tooltip values.
  • Improves locale-aware decimal formatting and handles small amounts explicitly.
  • Adds regression tests for large values, rounding boundaries, locale formatting, and invalid inputs.

Scope and assignment

  • The linked issue has the exact Stellar Wave label.
  • The PR author is assigned or explicitly approved by a maintainer.
  • This PR resolves one task and all dependencies are safely completed.

Architecture, UX, and security

  • Optimism/EVM wallet tooling and canonical ABI/address artifacts are used.
  • No fabricated calldata, gas, transaction hash, receipt, reward, reputation, or settlement is presented.
  • Contracts remain authoritative and the API remains a projection/read layer.
  • Unsupported chain, missing configuration, stale critical data, rejection, revert, replacement, finality, and reorg states fail safely.
  • Keyboard, focus, screen-reader, responsive, and reduced-motion behavior was considered.
  • No Stellar/Soroban/Freighter runtime, secret, placeholder address, or production mock is bundled.

Validation

  • Lint, typecheck, unit tests, and production build pass.
  • Wallet/provider integration tests pass.
  • Accessibility and E2E tests pass.
  • Bundle, dependency, security, and artifact-drift checks pass.
  • Required human CODEOWNER approval applies to this exact head SHA.

Validation notes

The focused formatter and economics tests passed (216 tests across six suites). Artifact verification, production-boundary source checks, the accessibility CI gate, and git diff --check passed.

Lint was blocked by an ESLint/plugin compatibility error. Type-checking encountered JSX parsing errors in unrelated files. The accessibility test suite also has failures in files outside this change. Full validation is therefore not yet green.

@SmashRex
SmashRex requested a review from dDevAhmed as a code owner October 19, 2026 10:59
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: DigiNodes/truthbounty-frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 36d3b1b9-2fdd-4971-ad1a-14f3db72ceb7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

UI-FE-054 — Centralize Exact Asset Amount and BPS Formatting

1 participant