[Frontend] Stop hardcoding 7 decimals in stream-details amount formatting
Overview & Background
The stream-details page formats every amount with a hardcoded 7 decimals — nine call sites, e.g. formatAmount(ratePerSecond, 7) in frontend/src/app/streams/[id]/stream-details-content.tsx:518,522,552,556,567,571,575,594,902. Meanwhile useStreams.ts:72-77 resolves real per-token decimals with the comment "never silent 18", and soroban.ts:296-305 even calls the token's decimals() on-chain. Any token whose contract exposes a different decimals() value renders amounts off by orders of magnitude. The local StreamDetail interface has no decimals field, making the bug invisible at the type level.
Technical Specification & Architecture
- Carry
tokenDecimalsonStreamDetail(available from the samedecimals()lookupamount.tsperforms). - Pass it to every
formatAmountcall instead of the literal7. - Remove the local type's blindness: make missing decimals a compile error.
Target Files
frontend/src/app/streams/[id]/stream-details-content.tsxfrontend/src/hooks/useStreams.tsfrontend/src/utils/amount.ts
Acceptance Criteria
- [ ] No hardcoded decimal count remains in amount formatting.
- [ ] A non-7-decimal token renders correctly on the stream details page.
- [ ] The
StreamDetailtype requires decimals.
@xeron-droid has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
i can solve
ℹ️ Repo Maintainers: To accept this application, review their application or assign @xeron-droid to this issue.
Congratulations, @xeron-droid! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @xeron-droid: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @xeron-droid as part of the Stellar Wave Program's 11th Wave 🥳
😎 @xeron-droid: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.