Skip to content

feat(wallet): refine home activity and swap rate note#638

Open
sahilc0 wants to merge 1 commit into
wt-swap-ui-redesign-20260527from
wt-home-activity-swap-rate-note-20260529
Open

feat(wallet): refine home activity and swap rate note#638
sahilc0 wants to merge 1 commit into
wt-swap-ui-redesign-20260527from
wt-home-activity-swap-rate-note-20260529

Conversation

@sahilc0
Copy link
Copy Markdown
Contributor

@sahilc0 sahilc0 commented May 29, 2026

Summary

  • Move Recent activity above the home upsell section and keep the section label as "Do more with your money".
  • Remove the LendaSat homepage upsell entry so the home upsell section only keeps buy/sell.
  • Add an accessible rate note indicator in the swap review drawer with hover support, tap support, animation, and tap auto-dismiss.
  • Remove the temporary dev USD/CHF swap test asset scaffolding and env typing.

Testing

  • bun run format:check
  • bun run lint
  • bun run test:unit -- src/test/screens/wallet/swap.test.tsx src/test/App.test.tsx src/test/screens/wallet/index.test.tsx
  • bun run build

Affected areas

  • Home wallet section ordering and upsells
  • Swap review drawer rate row
  • Wallet/swap unit tests
  • Temporary dev swap asset cleanup

Move Recent activity above the home upsell section, remove the LendaSat homepage entry, and add an accessible animated rate note to the swap review drawer.

Remove temporary dev swap asset scaffolding so the wallet only uses real portfolio rows.
@sahilc0 sahilc0 requested review from bordalix and pietro909 May 29, 2026 18:11
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6201cf
Status: ✅  Deploy successful!
Preview URL: https://2bc776a1.arkade-wallet.pages.dev
Branch Preview URL: https://wt-home-activity-swap-rate-n.arkade-wallet.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • next-version

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 77e8378e-aed8-47d3-a1c3-28f2cb558ace

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wt-home-activity-swap-rate-note-20260529

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying tmp-boltz-upstream-mainnet-arkade-wallet with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6201cf
Status: ✅  Deploy successful!
Preview URL: https://e726de4d.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev
Branch Preview URL: https://wt-home-activity-swap-rate-n.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6201cf
Status: ✅  Deploy successful!
Preview URL: https://95c20824.wallet-bitcoin.pages.dev
Branch Preview URL: https://wt-home-activity-swap-rate-n.wallet-bitcoin.pages.dev

View logs

Copy link
Copy Markdown

@arkanaai arkanaai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — clean UI PR, no protocol-critical concerns

What I reviewed

  • Full diff (10 files, +199 / -96)
  • Cross-repo impact: devSwapTestAssets had zero consumers outside this repo. usePortfolioFiat / PortfolioRow exports unchanged except for removing the dev-only containsDevSwapTestAssets helper.
  • LendaSat route (Pages.AppLendasat) still exists in navigation.tsx and is accessible from Apps/Index.tsx — removing the homepage upsell card is non-breaking.
  • CI: Cloudflare Pages build passing.

File-by-file

src/lib/devSwapTestAssets.ts (deleted) — Clean removal. All consumers (usePortfolioFiat.ts, Swap/Index.tsx) updated in the same PR. VITE_DEV_SWAP_TEST_ASSETS removed from vite-env.d.ts. No orphaned references.

src/hooks/usePortfolioFiat.ts — Removed dev asset injection block and containsDevSwapTestAssets export. The remaining normalizeMinorUnits and portfolio logic untouched. Good.

src/screens/Wallet/Index.tsx — Section reorder (RecentActivitySection before UpsellsSection). Purely presentational. ✓

src/screens/Wallet/UpsellsSection.tsx — Removed LendaSat card + handleLoans + LandmarkIcon import. Section label kept as "Do more with your money". Clean.

src/screens/Wallet/Swap/Index.tsx — Two changes:

  1. swapAssets = assets (line ~86): Previously filtered to dev-only assets when test flag was on. Now just uses the real assets array directly. Since assets is already memoized via useMemo, no unnecessary re-renders introduced. ✓
  2. RateLabel component (lines ~917–989): Good accessibility — aria-label on the button, aria-describedby pointing to tooltip via useId(), role="tooltip". Timer cleanup via useEffect(() => clearDismissTimer, [clearDismissTimer]) correctly prevents stale timeouts on unmount. pointer-events: none on tooltip is fine for a short read-only note.

src/index.css — Tooltip styles are scoped to .swap-rate-* classes. touch-action: manipulation and -webkit-tap-highlight-color: transparent are good mobile UX choices. color-mix(in srgb, ...) has solid browser support (baseline 2023).

Tests — Two new swap tests cover tooltip visibility and auto-dismiss. Auto-dismiss test uses { timeout: 3500 } for a 2400ms timer — adequate margin. Wallet index test updated to assert section ordering and LendaSat removal. VITE_DEV_MNEMONIC env stub added to App.test.tsx.

Nits (non-blocking)

  • Swap/Index.tsx:86const swapAssets = assets could just be inlined at usage sites (swapAssets is now a pure alias), but readability is fine as-is.
  • Swap/Index.tsx:61rateNoteAutoDismissMs = 2400: consider whether this should be configurable or at least documented as a UX constant somewhere centralized if other tooltips adopt the same pattern later.

Protocol-critical: No. This PR touches only UI layout, a tooltip, and dev scaffolding removal. No VTXO, signing, forfeit, round, or exit path code.

🤖 arkana review — opus

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