feat(wallet): expose kit/network in context and wire NEXT_PUBLIC_STEL…#295
Merged
davedumto merged 1 commit intoStreamFi-x:devfrom Feb 25, 2026
Merged
Conversation
…LAR_NETWORK - Resolve NEXT_PUBLIC_STELLAR_NETWORK at module load: "pubnet" maps to WalletNetwork.PUBLIC, anything else (including unset) defaults to TESTNET - Pass the resolved network constant into StellarWalletsKit constructor instead of the previous hardcoded WalletNetwork.TESTNET - Add kit (StellarWalletsKit instance) and network (WalletNetwork) to StellarWalletContextType and the Provider value so consumers can sign transactions and inspect the active network without prop-drilling
|
@akintewe is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Hi @akintewe Loom video needed |
Contributor
Author
|
@davedumto this is it. Screen.Recording.2026-02-25.at.8.39.00.AM.mov |
Contributor
Author
|
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
This PR completes the migration from StarkNet to Stellar by replacing
StarknetConfigwith a customStellarWalletProviderReact context, and wiring up network configuration via environment variable.Changes
contexts/stellar-wallet-context.tsxStellarWalletsKitwithallowAllModules()(Freighter, xBull, Albedo, Lobstr, etc.)NEXT_PUBLIC_STELLAR_NETWORKenv var at module load:"pubnet"→WalletNetwork.PUBLIC, anything else (including unset) →WalletNetwork.TESTNETStellarWalletContextReact context exposing:kit— theStellarWalletsKitinstance (for signing transactions)publicKey/address— connected wallet's Stellar public key (string | null)isConnected— boolean connection statestatus—"connected" | "disconnected" | "connecting"connect()— opens the built-in wallet selection modaldisconnect()— clears connection state and localStoragenetwork— activeWalletNetworkvalueisConnecting/isLoading/error— UI state helperslocalStoragesilently on page loaduseStellarWallet()hook with a guard error if used outside the providercomponents/providers.tsx@starknet-reactimports removedStarknetConfigreplaced withStellarWalletProviderStellarWalletProvider > ThemeProvider > AuthProvider > childrenAcceptance Criteria
StarknetConfigcompletely removed fromproviders.tsxcontexts/stellar-wallet-context.tsxcreatedStellarWalletProviderwraps the app inproviders.tsxallowAllModules()(Freighter, xBull, Albedo, Lobstr, etc.)NEXT_PUBLIC_STELLAR_NETWORKenv var (testnet/pubnet)kit,publicKey,isConnected,connect(),disconnect(),networkuseStellarWallet()hook exported and usable from any componentStellarWalletProvider > ThemeProvider > AuthProvider > children@starknet-reactimports remain inproviders.tsxEnvironment Variable
Add to your
.env.local:Closes #231