#20 Add Universal Stellar Wallet Connect Support#33
Open
Wetshakat wants to merge 1 commit intoSudiptaPaul-31:mainfrom
Open
#20 Add Universal Stellar Wallet Connect Support#33Wetshakat wants to merge 1 commit intoSudiptaPaul-31:mainfrom
Wetshakat wants to merge 1 commit intoSudiptaPaul-31:mainfrom
Conversation
Author
|
@SudiptaPaul-31 kindly review |
Collaborator
|
Please fix conflicts @Wetshakat |
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.
PR Description:
Closes #20
Summary
This PR implements a universal Stellar wallet connection system that allows users to connect multiple wallets from the UI, including Freighter, Albedo, and a placeholder for Lobstr. It provides a flexible, modular, and future-proof approach to wallet integration in the Stellar ecosystem.
Users can connect, view their public key in a shortened format, and disconnect wallets with proper handling of errors or missing wallet extensions.
Features Implemented
Connect Wallet button visible in the header/navigation.
Supports multiple Stellar wallets:
Freighter: Browser extension with reliable detection and async injection handling.
Albedo: Web wallet via official @albedo-link/intent package.
Lobstr: Placeholder for future WalletConnect integration.
Global connection state via React Context.
Public key display in shortened format once connected.
Disconnect functionality to clear wallet state.
Error handling for unsupported or uninstalled wallets.
Modular, extensible architecture for adding more Stellar wallets in the future.
Technical Details
Uses client-only components ("use client") to ensure wallets injected in the browser are detected properly.
Freighter integration now waits for the wallet to inject using polling.
Albedo integration is network-aware and retrieves public keys securely.
Modular adapter pattern allows future wallets (like Lobstr or others) to be plugged in easily.
Compatible with Stellar SDK for transaction handling.
Provides loading and error states in the UI for better user experience.
Acceptance Criteria
"Connect Wallet" button implemented and visible.
Users can connect using Freighter.
Users can connect using Albedo.
Public key is retrieved and displayed correctly in shortened format.
Users can disconnect their wallet.
Errors are handled cleanly.
Implementation is extensible for additional Stellar wallets.
No regression in existing UI or functionality.
Technical Details
Uses client-only components ("use client") to ensure wallets injected in the browser are detected properly.
Freighter integration now waits for the wallet to inject using polling.
Albedo integration is network-aware and retrieves public keys securely.
Modular adapter pattern allows future wallets (like Lobstr or others) to be plugged in easily.
Compatible with Stellar SDK for transaction handling.
Provides loading and error states in the UI for better user experience.