Skip to content

feat(wallet): add Ledger & WalletConnect multi-wallet support (#34) - #188

Merged
Darkvader-ship-it merged 2 commits into
PHASE-STELLAR:mainfrom
Peace-001:feature/multi-wallet-hardware-walletconnect
Aug 31, 2026
Merged

feat(wallet): add Ledger & WalletConnect multi-wallet support (#34)#188
Darkvader-ship-it merged 2 commits into
PHASE-STELLAR:mainfrom
Peace-001:feature/multi-wallet-hardware-walletconnect

Conversation

@Peace-001

Copy link
Copy Markdown
  • lib/stellar-wallet-kit.ts

    • Add LedgerModule and WalletConnectModule to kit modules array
    • Export LEDGER_ID, WALLET_CONNECT_ID, WalletConnectTargetChain
    • Export TESTNET_PASSPHRASE / MAINNET_PASSPHRASE constants
    • Add isHardwareWalletSelected() and isWalletConnectSelected() helpers
    • signTransaction: network passphrase guard for Ledger (rejects unknown network before hitting HID transport)
    • signTransaction: friendly error messages for USB/timeout/rejected errors
    • WalletConnect project ID from NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
  • components/wallet-provider.tsx

    • Session restoration on mount via refresh()
    • Heartbeat: 8 s for hardware wallets, 30 s for extension wallets
    • navigator.usb connect/disconnect event listeners for immediate Ledger unplug detection
    • Hardware wallet network passphrase mismatch validation (calls kit.getNetwork() after connect and via effect)
    • Red banner UI alert when Ledger is on wrong network passphrase
    • isHardwareWallet / isWalletConnect flags exposed in context
    • stopHeartbeat() called on disconnect and session expiry
    • syncModuleFlags() on connect/openWalletPicker to keep flags current
  • components/freighter-connect.tsx

    • WalletTypeBadge: amber '⬡ LEDGER' badge for hardware wallets, blue '◈ WC' badge for WalletConnect sessions
    • Status dot: amber for Ledger, blue for WalletConnect, violet default
    • Context-aware connecting label: 'Opening Ledger…' / 'Opening QR…'
    • Import cn from @/lib/utils
  • .env.local.example

    • Document NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID variable

Closes #34

…STELLAR#34)

- lib/stellar-wallet-kit.ts
  - Add LedgerModule and WalletConnectModule to kit modules array
  - Export LEDGER_ID, WALLET_CONNECT_ID, WalletConnectTargetChain
  - Export TESTNET_PASSPHRASE / MAINNET_PASSPHRASE constants
  - Add isHardwareWalletSelected() and isWalletConnectSelected() helpers
  - signTransaction: network passphrase guard for Ledger (rejects unknown
    network before hitting HID transport)
  - signTransaction: friendly error messages for USB/timeout/rejected errors
  - WalletConnect project ID from NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID

- components/wallet-provider.tsx
  - Session restoration on mount via refresh()
  - Heartbeat: 8 s for hardware wallets, 30 s for extension wallets
  - navigator.usb connect/disconnect event listeners for immediate
    Ledger unplug detection
  - Hardware wallet network passphrase mismatch validation (calls
    kit.getNetwork() after connect and via effect)
  - Red banner UI alert when Ledger is on wrong network passphrase
  - isHardwareWallet / isWalletConnect flags exposed in context
  - stopHeartbeat() called on disconnect and session expiry
  - syncModuleFlags() on connect/openWalletPicker to keep flags current

- components/freighter-connect.tsx
  - WalletTypeBadge: amber '⬡ LEDGER' badge for hardware wallets,
    blue '◈ WC' badge for WalletConnect sessions
  - Status dot: amber for Ledger, blue for WalletConnect, violet default
  - Context-aware connecting label: 'Opening Ledger…' / 'Opening QR…'
  - Import cn from @/lib/utils

- .env.local.example
  - Document NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID variable

Closes PHASE-STELLAR#34
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Peace-001 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

@Darkvader-ship-it
Darkvader-ship-it merged commit 7dadcf7 into PHASE-STELLAR:main Aug 31, 2026
0 of 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.

[Feature] Implement Multi-Wallet Hardware Connection (Ledger & WalletConnect) in Wallet Provider

2 participants