Skip to content

Fix staked locked balance text cutoff#6094

Closed
j0ntz wants to merge 1 commit into
developfrom
jon/staked-funds-text-cutoff
Closed

Fix staked locked balance text cutoff#6094
j0ntz wants to merge 1 commit into
developfrom
jon/staked-funds-text-cutoff

Conversation

@j0ntz

@j0ntz j0ntz commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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:

  • The amount was formatted with a raw convertNativeToDenomination + formatNumber, bypassing the exchange-rate-adjusted truncation every other crypto amount in the app goes through. It now uses the shared getCryptoText helper, which truncates to a precision appropriate for the asset's exchange rate (0.0104577 ETH for ETH at ~$1.9k).
  • stakingBoxContainer carried a maxWidth: '70%' (contradicted by a minWidth: 18rem) and stakingStatusText carried a second maxWidth: '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 with flexShrink.

Asana: https://app.asana.com/0/1215088146871429/1210166111258621

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Verified on the iOS simulator (iPhone 16 Pro Max, iOS 18.6) against the My Ether 4 mainnet ETH wallet. The account holds no real stake position, so the locked amount was forced with a temporary uncommitted edit (lockedNativeAmount pinned to the bug report's 10457773261160339 wei) 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.

TransactionListTop now formats the locked amount with getCryptoText (same exchange-rate-aware truncation as elsewhere) instead of raw denomination conversion plus formatNumber. Staking row styles drop the maxWidth: '70%' clamps on the container and label; the text row can use the card width and flexShrink: 1 on the label.

CHANGELOG.md records the fix under Unreleased.

Reviewed by Cursor Bugbot for commit 349a27a. Bugbot is set up for automated code reviews on this repo. Configure here.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@j0ntz

j0ntz commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

📸🩹 Test evidence

🩹 Some screenshots below are HACK-FORCED. The marked frames show a state forced by a temporary uncommitted local edit (the natural trigger could not be reproduced on the sim). The hack is not in this PR's diff; the pixels prove the rendering, not the trigger.

🩹 HACK-FORCED: before fix cutoff

🩹 HACK-FORCED: before fix cutoff

🩹 HACK-FORCED: after fix readable

🩹 HACK-FORCED: after fix readable

Captured by the agent's in-app test run (build-and-test).

@j0ntz

j0ntz commented Jul 24, 2026

Copy link
Copy Markdown
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.

@j0ntz j0ntz closed this Jul 24, 2026
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.

1 participant