feat: multi-wallet support (Freighter, xBull, Albedo)#162
Open
aunysillyme wants to merge 1 commit into
Open
Conversation
Add a wallet adapter abstraction so SoroSave can connect through any of the major Stellar wallets, not just Freighter. - New WalletAdapter interface in src/lib/wallets/ with adapters for Freighter (existing API), xBull (window.xBullSDK), and Albedo (lazy-loaded @albedo-link/intent). - WalletSelectModal lists each wallet, shows install/availability state, and lets users pick one. - WalletContext tracks the active adapter, exposes signTransaction, and remembers the last used wallet in localStorage (sorosave:lastWallet) to auto-reconnect when the wallet is still available. - Replace direct @/lib/wallet imports across components; sign through the active adapter via context. Closes sorosave-protocol#66 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes #66.
Adds a wallet adapter abstraction so SoroSave can connect through any of the major Stellar wallets, not just Freighter.
WalletAdapterinterface insrc/lib/wallets/with adapters for Freighter (existing@stellar/freighter-api), xBull (window.xBullSDK), and Albedo (lazy-loaded@albedo-link/intent).WalletSelectModallists each wallet, shows install/availability state, and lets the user pick one. Wallets that aren't installed show an "Install" link to the wallet's site.WalletContexttracks the active adapter, exposessignTransaction(xdr), and persists the last used wallet inlocalStorageundersorosave:lastWalletso the app reconnects automatically when the wallet is still available.ContributeModal,CreateGroupForm) sign through the active adapter via context instead of importing a Freighter-only helper. The legacysrc/lib/wallet.tsis removed.@albedo-link/intentadded as a runtime dependency; xBull is detected through its injected global so no SDK install is required.Acceptance criteria
src/lib/wallets/types.tssrc/lib/wallets/{freighter,xbull,albedo}.tssrc/components/WalletSelectModal.tsxloadLastWalletId/saveLastWalletIdinsrc/lib/wallets/index.tsWalletNotInstalledErrorTest plan
/, click Connect Wallet → modal shows Freighter / xBull / AlbedoFreighter · G...XYZNotes
This PR is AI-assisted (drafted with Claude). Please review carefully — in particular the xBull/Albedo signing flows have not been exercised against a live wallet in this environment.
/claim #66
🤖 Generated with Claude Code