Fix staked locked balance text cutoff#6094
Closed
j0ntz wants to merge 1 commit into
Closed
Conversation
Truncate the locked crypto amount with the shared getCryptoText helper so it uses the same exchange-rate-adjusted precision as the rest of the app, and drop the nested maxWidth clamps that limited the status text to roughly half the card width.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
📸🩹 Test evidence
🩹 HACK-FORCED: before fix cutoff 🩹 HACK-FORCED: after fix readable Captured by the agent's in-app test run (build-and-test). |
6 tasks
Contributor
Author
|
Superseded by #6105, which consolidates this and 11 other small GUI task branches into one PR/branch per the umbrella task's instructions. |
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.


Description
The staked "locked" line under the wallet balance rendered the locked crypto amount at full native precision (e.g.
0.010457773261160339 ETH locked ($18.97 USD)), so the message got cut off mid-string on narrow screens.Two causes, both fixed:
convertNativeToDenomination+formatNumber, bypassing the exchange-rate-adjusted truncation every other crypto amount in the app goes through. It now uses the sharedgetCryptoTexthelper, which truncates to a precision appropriate for the asset's exchange rate (0.0104577 ETHfor ETH at ~$1.9k).stakingBoxContainercarried amaxWidth: '70%'(contradicted by aminWidth: 18rem) andstakingStatusTextcarried a secondmaxWidth: '70%'on top of it, clamping the text to roughly half the card width. Both clamps are gone; the text row now spans the card and shrinks withflexShrink.Asana: https://app.asana.com/0/1215088146871429/1210166111258621
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Verified on the iOS simulator (iPhone 16 Pro Max, iOS 18.6) against the
My Ether 4mainnet ETH wallet. The account holds no real stake position, so the locked amount was forced with a temporary uncommitted edit (lockedNativeAmountpinned to the bug report's10457773261160339wei) to render the real component with real denominations and a live exchange rate. Before/after frames are attached below; the hack was reverted and the tree verified clean before committing.Note
Low Risk
Localized wallet-header UI and styling in TransactionListTop with no auth, payment, or data-model changes.
Overview
Fixes the wallet view staked "locked" line being truncated on narrow screens when the crypto amount was shown at full precision.
TransactionListTopnow formats the locked amount withgetCryptoText(same exchange-rate-aware truncation as elsewhere) instead of raw denomination conversion plusformatNumber. Staking row styles drop themaxWidth: '70%'clamps on the container and label; the text row can use the card width andflexShrink: 1on the label.CHANGELOG.mdrecords the fix under Unreleased.Reviewed by Cursor Bugbot for commit 349a27a. Bugbot is set up for automated code reviews on this repo. Configure here.