Skip to content

fix: shorten liquid and lightning network label - #2467

Merged
ethicnology merged 1 commit into
developfrom
2292-wallet-card-fiat-value-overflow
Jul 17, 2026
Merged

fix: shorten liquid and lightning network label#2467
ethicnology merged 1 commit into
developfrom
2292-wallet-card-fiat-value-overflow

Conversation

@wired-pasteque

Copy link
Copy Markdown
Collaborator

Fix: #2292

Simulator Screenshot - iPhone 16e - 2026-07-17 at 09 01 24

@wired-pasteque wired-pasteque self-assigned this Jul 17, 2026
@wired-pasteque wired-pasteque linked an issue Jul 17, 2026 that may be closed by this pull request
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown

Claude finished @wired-pasteque's task in 2m 1s —— View job


Review: fix: shorten liquid and lightning network label

  • Read PR diff against origin/develop
  • Check usages of walletTypeString for regressions
  • Review the wallet card layout in the overflow context of Wallet card fiat value overflow #2292
  • Post review findings

Summary

The change is safe and does what it says: walletTypeString is only consumed in lib/features/wallet/ui/widgets/wallet_cards.dart:73, there are no tests or other call sites depending on the old string, and the screenshot confirms the card renders correctly. No correctness bugs, security issues, or regressions from this diff itself.

However, this fixes the symptom of #2292 rather than the cause, so the overflow can still reproduce. Two findings below (I can't submit formal inline review comments from this workflow, so they're listed here with file/line references).

Findings

1. The card layout can still overflow — the root cause of #2292 is untouched (lib/core/widgets/cards/wallet_card.dart:80-97)

The description row places two unconstrained widgets side by side:

Row(
  mainAxisAlignment: MainAxisAlignment.spaceBetween,
  children: [
    BBText(description, ...),          // no Flexible, no maxLines
    const Gap(4),
    CurrencyText(balanceSat, showFiat: true, ...),
  ],
),

Neither child is wrapped in Flexible/Expanded, and BBText without maxLines falls back to a plain Text with no ellipsis. So the overflow will still occur whenever the combined width exceeds the card — e.g. high-denomination fiat currencies (COP, ARS, JPY produce values like 1,234,567.89 COP), larger system font scales, or narrower devices. The title row (wallet_card.dart:62-78) has the same structure and is even more exposed, since displayLabel returns the user's arbitrary-length custom wallet label for non-default wallets (wallet.dart:156).

A more durable fix is to wrap the left-hand BBText in Flexible with maxLines: 1 (and ellipsis) in both rows, so the label yields to the amount instead of overflowing. Fix this →

2. Hardcoded English string diverges from the localization catalog (lib/core/wallet/domain/entities/wallet.dart:139)

localization/app_en.arb:3484 defines walletTypeLiquidLightningNetwork: "Liquid and Lightning network" (with translations in ~15 locales), but walletTypeString hardcodes English and this PR now makes the hardcoded value diverge from the catalog. The key appears unused in lib/ today, but if these labels are meant to be localized eventually (the neighboring Ark card at wallet_cards.dart:84-85 already uses context.loc.*), the shortened text should also be reflected in the .arb entries — otherwise a future switch to localization silently reintroduces the long "Liquid and Lightning network" string and the overflow. Minor, but worth aligning.

Verdict

Approve-with-suggestions: the label shortening is a fine immediate mitigation and regression-free, but consider following up with the Flexible/ellipsis layout fix so #2292 can't recur through other inputs (large fiat amounts, custom wallet names, font scaling).

@ethicnology
ethicnology merged commit 0636f0c into develop Jul 17, 2026
3 checks passed
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.

Wallet card fiat value overflow

2 participants