feat: MUSD-508 align earn balance rows with parent asset layout and add privacy mode support#27457
feat: MUSD-508 align earn balance rows with parent asset layout and add privacy mode support#27457
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: No core Engine, controller, network, identity, or multi-chain permission logic was modified. Changes are UI-focused within staking/earn modules, so broader tags (Accounts, Network, Identity, MultiChainAPI, etc.) are not required. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
Fixes visual inconsistencies in the "Staked Ethereum" (
StakingBalance) and Stablecoin lending (EarnLendingBalance) balance rows so they match the layout of their parent asset rows above them.Layout fixes (both components):
size={AvatarSize.Lg}from the networkBadgeto use the default sizesecondaryBalanceElementonAssetElement)Privacy mode:
AssetElement'sprivacyModepropSensitiveTextand hidden when privacy mode is onChangelog
CHANGELOG entry: update earn balance row layout (logo size, badge size, balance/percentage placement) and add privacy mode support for StakingBalance and EarnLendingBalance
Related issues
Fixes: MUSD-508: Earn asset details screen paper cuts
Manual testing steps
Screenshots/Recordings
Before
After
earn-papercuts-demo.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate UI risk: changes how balances/percent change render and switches some buttons to the design-system components, which could affect layout, accessibility, or privacy masking behavior.
Overview
Updates
EarnLendingBalanceandStakingBalanceto match the parent asset-row layout by moving percentage change intoAssetElement’ssecondaryBalanceElement(right side) and displaying the token amount beneath the asset name (left side), along with associated style tweaks (spacing/alignment and larger 40×40 logos for staking).Adds privacy mode support to these rows by passing
privacyModeintoAssetElement(masking fiat) and wrapping the token amount inSensitiveText(masking crypto), while keeping percentage change visible.Standardizes several action buttons (
EarnLendingBalance,StakingButtons) to@metamask/design-system-react-nativeand adjusts sizing (Md), updatesEarningsHistoryButtonbutton size, and refreshes Jest snapshots accordingly (plus adds bottom padding inStakingEarnings).Written by Cursor Bugbot for commit 1e2bf3b. This will update automatically on new commits. Configure here.