fix: render tiny balances with typographic subscript#167
Closed
fix: render tiny balances with typographic subscript#167
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying interwovenkit with
|
| Latest commit: |
5527ece
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://727520a5.interwovenkit.pages.dev |
| Branch Preview URL: | https://fix-mobile-scroll-autosign-t.interwovenkit.pages.dev |
Deploying interwovenkit-testnet with
|
| Latest commit: |
5527ece
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5bf4c36f.interwovenkit-testnet.pages.dev |
| Branch Preview URL: | https://fix-mobile-scroll-autosign-t.interwovenkit-testnet.pages.dev |
This reverts commit 5527ece.
Contributor
Author
|
Closing this PR because it was opened from the wrong branch by mistake. The correct draft PR is #168. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This updates amount rendering so very small non-zero balances no longer appear as plain
0.000000and instead use a true typographic subscript presentation for hidden leading zeros.User impact
Users with tiny balances can now distinguish between zero and non-zero values across bridge, asset selection, transfers, send, portfolio, and fee-related amount surfaces. The subscript is rendered as real baseline-lowered text instead of Unicode subscript glyphs.
Root cause
Amount formatting previously relied on fixed decimal truncation, which collapsed many non-zero values to
0.000000. The initial follow-up approach encoded subscript into formatted strings, which coupled formatting output to UI parsing.What changed
lib/formatto explicitly represent subscript segments.FormattedAmountto render amount text with a real<sub>element for hidden leading-zero counts.FormattedFeeListto unify fee amount rendering and remove duplicated fee mapping logic.QuantityInput.ReadOnlyplaceholder state explicit (isPlaceholderrequired) to remove brittle ReactNode-to-number inference.Scope notes
This keeps precision policy consistent with existing display constraints while making tiny-value formatting explicit and reusable through shared components.
Checks
pnpm -C packages/interwovenkit-react testpnpm -C packages/interwovenkit-react typecheckNote
Low Risk
CSS/layout-only changes that may affect scrolling and sizing across multiple screens, but don’t alter business logic or data flow.
Overview
Improves scroll behavior and overflow containment across the drawer by updating
Scrollablestyling (addsmin-height: 0, momentum scrolling, andoverscroll-behavior).Wraps
EnableAutoSignandTxRequestcontent in new.pageflex containers and constrains the drawer’s routed content via a new.routeswrapper, reducing layout/scroll glitches when pages contain headers/footers inside the drawer.Written by Cursor Bugbot for commit c37b01b. This will update automatically on new commits. Configure here.