feat: multi-wallet support — Solflare, Phantom, Backpack#97
Merged
Conversation
Per user request, expand wallet support beyond Solflare-only. All
three providers share the same legacy provider API (Phantom copied
Solflare's interface, Backpack is wallet-standard compatible), so
the existing service layer abstracts cleanly:
services/solflare.ts (kept the filename for callsite continuity):
- WalletProvider interface replaces SolflareProvider
- SUPPORTED_WALLETS registry with id/label/downloadUrl/detect()
- selectWallet(id) + getSelectedWalletId() / getSelectedWalletLabel()
- getProvider() resolves window.solflare | phantom.solana | backpack
- Listener bind/unbind tracks the active provider so swapping
wallets mid-session doesn't leak Solflare-side handlers
- Persisted choice in localStorage (liminal:wallet:selected)
- All error messages now include the active wallet label
components/WalletPickerModal.tsx (new):
- LIMINAL-styled picker, 3 rows with colored glyphs
- Detects installed extensions on open, badges them 'Detected'
- Uninstalled wallets open the official download page
- Esc + backdrop dismiss
Header / WalletPage / ExecutionPanel:
- 'Connect Solflare' CTAs now open the picker instead of calling
connectWallet() directly
- Labels updated to neutral 'Connect wallet' / 'Choose your wallet'
Trade-off vs. CLAUDE.md BLOK 6: integration depth is now spread
across three wallets instead of concentrated on Solflare. For the
Solflare hackathon track this dilutes the depth signal, but for
real users it removes the install friction of forcing a single
brand. Solflare remains the default first-time selection.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per user request, expand wallet support beyond Solflare-only. All three providers share the legacy provider API, so the existing service abstracts cleanly.
Changes
services/solflare.ts:WalletProviderinterface,SUPPORTED_WALLETSregistry,selectWallet/getSelectedWalletId/getSelectedWalletLabel, dynamicgetProvider()that resolveswindow.solflare/phantom.solana/backpack. Listener bind/unbind tracks the active provider so swapping wallets mid-session doesn't leak handlers. Persisted choice inliminal:wallet:selected.components/WalletPickerModal.tsx: new LIMINAL-styled picker. 3 rows with colored glyphs, detects installed extensions, badges them 'Detected'. Uninstalled → opens official download page. Esc + backdrop dismiss.Verified
Trade-off
CLAUDE.md BLOK 6 originally pinned Solflare-only for hackathon integration depth. Multi-wallet dilutes that signal for the Solflare track specifically, but removes install friction for real users.