Skip to content

fix: cash and token rows have different bold#27736

Merged
PatrykLucka merged 1 commit into
mainfrom
TMCU-579-cash-and-token-rows-have-different-bold
Mar 20, 2026
Merged

fix: cash and token rows have different bold#27736
PatrykLucka merged 1 commit into
mainfrom
TMCU-579-cash-and-token-rows-have-different-bold

Conversation

@PatrykLucka

@PatrykLucka PatrykLucka commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Description

  1. Typography: The homepage Cash section mUSD row showed the aggregated fiat value in bold (BodyMDBold), while token list rows (TokenListItemV2) use medium weight for primary fiat (BodyMDMedium), so Cash looked heavier than the rest of the wallet.
  2. Layout: Spacing and structure (gap-5 vs avatar, gap-0.5 between lines) did not match the two-line token row pattern (flex-1 ml-5, gap-2.5 on each row).
  3. Fiat strings: useMusdBalance formatted currency with I18n.locale (e.g. en-US). Token balanceFiat uses formatWithThreshold with getLocaleLanguageCode() elsewhere in the assets flow. That mismatch could produce inconsistent currency symbols (e.g. US$ vs $) between Cash and token rows.

Solution

  • MusdAggregatedRow: Match TokenListItemV2’s text column: flex-1 ml-5, two rows with justifyContent={Between} and twClassName="gap-2.5"; primary fiat uses BodyMDMedium; the second row wraps claim / spinner / APY in an inner Box so the token amount stays right-aligned like the list.
  • useMusdBalance: Replace I18n.locale with getLocaleLanguageCode() for all formatWithThreshold fiat formatting (per-chain and aggregated) so Cash uses the same locale strategy as token fiat balances.

Changelog

CHANGELOG entry: Updated Cash (mUSD) row typography and layout to match the token list and aligned aggregated mUSD fiat formatting with token balance locale handling.

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-579

Manual testing steps

Feature: Cash mUSD row matches token list

  Scenario: Primary fiat weight matches token rows
    Given the user sees the Cash section with mUSD balance (Homepage sections enabled, eligible for Cash)
    When they view the mUSD row
    Then the aggregated fiat amount uses medium weight (same as token list fiat), not bold

  Scenario: Layout and spacing align with token list rows
    Given the same Cash mUSD row is visible
    When comparing to any token row in the token list
    Then the two-line layout (title + fiat on first row; secondary info + token amount on second) and spacing feel consistent

  Scenario: Fiat symbol matches token list formatting
    Given primary currency is USD and device locale is set (e.g. en-US)
    When viewing Cash aggregated fiat and a token’s fiat balance on the same screen
    Then both use the same currency symbol style (e.g. $ consistently, not US$ on Cash only)

Screenshots/Recordings

Before

Screenshot 2026-03-20 at 13 14 17

After

Screenshot 2026-03-20 at 13 10 50

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Low risk UI/formatting changes: adjusts Cash mUSD row layout/typography and switches fiat formatting locale helper; no business logic or data flows are changed beyond display formatting.

Overview
Updates the Homepage Cash section’s mUSD aggregated row to visually match TokenListItemV2, including spacing, two-line structure, and changing the primary fiat amount from bold to medium weight while keeping the right-side token amount aligned.

Standardizes mUSD fiat formatting in useMusdBalance by replacing I18n.locale with getLocaleLanguageCode() for per-chain and aggregated formatWithThreshold calls, aligning currency symbol/locale behavior with token list fiat displays.

Written by Cursor Bugbot for commit 8305a44. This will update automatically on new commits. Configure here.

…le handling and improve MusdAggregatedRow layout
@PatrykLucka PatrykLucka self-assigned this Mar 20, 2026
@PatrykLucka PatrykLucka marked this pull request as ready for review March 20, 2026 12:56
@PatrykLucka PatrykLucka requested a review from a team as a code owner March 20, 2026 12:56
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-mobile-ux Mobile UX team label Mar 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@PatrykLucka PatrykLucka changed the title Tmcu 579 cash and token rows have different bold fix: cash and token rows have different bold Mar 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@PatrykLucka PatrykLucka enabled auto-merge March 20, 2026 13:54
@PatrykLucka PatrykLucka added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 89cc07c Mar 20, 2026
213 of 219 checks passed
@PatrykLucka PatrykLucka deleted the TMCU-579-cash-and-token-rows-have-different-bold branch March 20, 2026 15:05
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 20, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants