Skip to content

Feature/526 multi wallet switcher - #544

Merged
KuchiMercy merged 3 commits into
StayLitCodes:mainfrom
mijinummi:feature/526-multi-wallet-switcher
Aug 25, 2026
Merged

Feature/526 multi wallet switcher#544
KuchiMercy merged 3 commits into
StayLitCodes:mainfrom
mijinummi:feature/526-multi-wallet-switcher

Conversation

@mijinummi

@mijinummi mijinummi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Overview

Introduces a multi-wallet account switcher that allows users to connect, manage, and seamlessly switch between multiple Stellar wallets (e.g., Freighter, Albedo, Lobstr) without disconnecting their current session.

Closes #526

Technical Details & Scope

1. State Management & Storage

  • Target File: apps/frontend/app/contexts/WalletContext.tsx
  • Persistence: Saves previously connected wallets to localStorage for automatic reconnection across sessions.
  • Provider Support: Extended factory integration (apps/frontend/app/services/wallet/index.ts) to manage active and standby wallet provider instances.

2. UI & Component Enhancements

  • Target File: apps/frontend/components/wallet/WalletButton.tsx
  • Desktop UI: Interactive dropdown menu showing the active wallet, connected accounts with provider icons, truncated addresses, and network labels.
  • Mobile UX: Displays a responsive drawer interface for touch-friendly wallet switching on smaller viewports.
  • Wallet Actions: Integrated "Add Wallet" flow to connect new providers and "Remove Wallet" option to clear saved credentials and trigger a full disconnect.

3. Session Synchronization & Invalidation

  • Cache Management: Automatically invalidates React Query cache upon wallet context changes.
  • Auth Lifecycle: Triggers dynamic auth token refreshes and re-fetches user data instantly upon switching active accounts.

Acceptance Criteria Checklist

  • Dropdown in WalletButton shows connected wallet + option to add another
  • Remember previously connected wallets (localStorage)
  • Quick-switch between connected wallets without full disconnect
  • Show wallet provider icon next to each account
  • Show truncated address and network for each
  • Active wallet highlighted with check mark
  • "Add wallet" connects a new provider while keeping existing ones
  • "Remove wallet" option (full disconnect + forget)
  • On switch: refresh auth token, re-fetch user data, invalidate React Query cache
  • Mobile-friendly drawer interface
  • Unit tests for wallet switching logic

Test Coverage & Verification

  • Unit Tests: Added unit tests covering wallet switching, localStorage persistence, and session cache invalidation logic.
  • Wallet Providers: Tested multi-account connection flows across Freighter, Albedo, and Lobstr instances.
  • Mobile & Desktop Verification: Confirmed desktop dropdown and mobile drawer interfaces function cleanly across screen sizes.

@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@mijinummi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@KuchiMercy
KuchiMercy merged commit ff20c30 into StayLitCodes:main Aug 25, 2026
4 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.

feat(frontend): Build multi-wallet account switcher

2 participants