Skip to content

feat(wallet): dashboard polish — top-5 transactions + switch flow + NWC dashboard + settings cleanup#571

Open
dmnyc wants to merge 2 commits into
barrydeen:mainfrom
dmnyc:feat/wallet-dashboard-polish
Open

feat(wallet): dashboard polish — top-5 transactions + switch flow + NWC dashboard + settings cleanup#571
dmnyc wants to merge 2 commits into
barrydeen:mainfrom
dmnyc:feat/wallet-dashboard-polish

Conversation

@dmnyc
Copy link
Copy Markdown
Contributor

@dmnyc dmnyc commented May 26, 2026

Second in the slim carve-out series from #556. Two commits, both wallet-screen polish.

Commits

1. fix(wallet): show top 5 recent transactions on dashboard footer instead of 17f52e0a adapted

  • Match iOS: dashboard footer shows up to 5 most-recent transactions inline (was 1). Tap any row (or "View all") to expand to the full screen.
  • Adapted from the original commit: row count scales with the device's available height so a compact phone (~640dp tall) doesn't crowd out the balance + Send/Receive controls, while bigger displays still get up to 5 rows. (This is a refinement carried over from later in the original feat(zap): port iOS one-tap-zap + NIP-78 parity + wallet polish #556 stack, folded in here.)
  • TransactionRow receives the existing balanceDisplay parameter from main (PR feat(wallet): cycle balance display between sats, fiat, and hidden #562) so the rows render in the user's chosen denomination.

2. feat(wallet): parity polish — switch flow, NWC dashboard, settings cleanup810afda

  • Switch-wallet flow refactor: smoother transitions, clearer copy
  • NWC dashboard polish to match iOS spacing/labels
  • Settings cleanup — removes a few stale rows that iOS doesn't render

Files

WALLET_PARITY.md
app/src/main/kotlin/com/wisp/app/ui/screen/WalletScreen.kt
app/src/main/kotlin/com/wisp/app/viewmodel/WalletViewModel.kt
app/src/main/res/values/strings.xml

Dropped from the original

fix(wallet): move NWC paste field above the Recommended wallets list (4f88bf9) was the third commit in this cluster. Its entire purpose — reordering the OutlinedTextField vs Recommended-wallets list — is superseded by PR #561's NWC connect screen redesign already in main (which removed the OutlinedTextField + Recommended list entirely in favour of the iOS-style Paste/Scan card). Carrying the commit forward would produce an empty no-op merge, so it's dropped.

Test plan

  • Open Wallet → home dashboard with at least 5 transactions: footer shows 5 rows on a typical phone (≥720dp); 3 rows on a compact phone (~640dp)
  • Each transaction row honours the wallet's balance-display mode (sats / fiat / hidden) — tap header to cycle, rows update
  • Switch-wallet flow: from Spark to NWC and back — copy + transitions read as expected
  • NWC dashboard: spacing, labels match the iOS reference
  • Wallet settings: no stale rows

Carve-out context

Continues the slim-PR series superseding #556. First out was #570 (wallet setup screen — Spark primary). Up next: bolt glow pulse animation.

dmnyc added 2 commits May 26, 2026 10:24
…ad of 1

The dashboard footer was capped at one transaction. iOS shows up
to five rows inline before the "View all" affordance — matching
that here. Tapping any row (or "View all") still expands to the
full transactions screen.
…eanup

Post-connect navigation
- When isConnected flips true while currentPage is NwcSetup or
  SparkSetup, clear the back stack and set currentPage = Home. Fixes
  the "Wallet" TopAppBar showing over the connected NWC dashboard
  because the setup screen lingered until the user navigated away.

Switch / Disconnect entry on Wallet Settings
- iOS-style Card row with SwapHoriz icon + "Switch to a different
  wallet" in #FF3B30 for both recoverable cases (default Spark and
  NWC). Section header "Disconnect Wallet" above, explanatory caption
  below. The destructive non-default Spark delete keeps the filled-red
  Button because the seed can't be re-derived from nsec — losing it is
  irreversible.
- Confirmation page unified on #FF3B30 across all three flows (icon
  halo, title, CTA, and "back up first" warning) instead of branching
  between Material primary orange and Material darker red #D32F2F.
- Switching from a default Spark wallet routes back to the wallet-mode
  picker (Home + NotConnected → renders WalletModeSelectionContent)
  rather than dropping the user on the Spark sub-screen.

NWC entry
- QR scan dialog reachable from the connection-string field's trailing
  icon. Reuses the existing QrScanner component; success populates
  onConnectionStringChange so paste + scan are both available.

NWC dashboard
- Lightning-address pill rendered for any wallet mode that carries a
  lud16 (Spark via Breez SDK, NWC via parsed URI). Removed the
  redundant "Nostr Wallet Connect" footer below the balance — the
  in-page top row already brands the connection (NWC logo + node
  alias).
- Adaptive recent-tx count via LocalConfiguration.screenHeightDp
  (5 / 4 / 3 / 2 rows by tier) so smaller phones don't crowd out
  the balance + Send/Receive controls.

Wallet Settings polish
- WalletInfoRow uses a fixed-width label column (widthIn min 110dp,
  trailing padding) and right-aligned values with maxLines = 1 +
  TextOverflow.Ellipsis so long relay URLs / lightning addresses
  truncate cleanly and labels align across rows.
- Backup-to-relay now offered for default Spark wallets too — matches
  iOS, gives users belt-and-braces durability beyond the nsec.

Strings + docs
- wallet_switch_wallet copy expanded to "Switch to a different
  wallet"; new wallet_disconnect_section + wallet_switch_wallet_caption.
- WALLET_PARITY.md §11.2 checklist items marked done for the parity
  work landed here and in the preceding two commits.
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