Skip to content

[Markets] Build multi-token market support in the UI - #1440

Open
samuel2926i39-art wants to merge 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1364-multi-token-support
Open

[Markets] Build multi-token market support in the UI#1440
samuel2926i39-art wants to merge 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1364-multi-token-support

Conversation

@samuel2926i39-art

Copy link
Copy Markdown

Summary

Adds TokenSelector plus a formatTokenAmount helper that formats market amounts using the market's actual settlement token symbol and decimal precision, instead of a hardcoded default asset.

Context

  • contracts/predict-iq/src/test_multi_token.rs proves markets can be denominated in different tokens; the UI had nothing that read per-market token metadata.
  • Before: amount formatting assumed a single default asset (symbol/decimals hardcoded).
  • After: amounts are formatted via formatTokenAmount(rawAmount, token), driven by each market's own token symbol/decimals, using BigInt arithmetic so high-decimal tokens (e.g. 18) aren't truncated or rounded by floating point.

Testing

  • Manually verified formatting against tokens with 2, 7, and 18 decimals, including trailing-zero trimming and negative amounts.
  • Verified low-decimal tokens (e.g. 0 decimals) render whole amounts with no stray decimal point.

Closes #1364

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@samuel2926i39-art Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Markets] Build multi-token market support in the UI

1 participant