feat: wallet configuration, availability detection, and @stacks/connect 8.2.5#2
Merged
satoshai-dev merged 13 commits intomainfrom Feb 25, 2026
Merged
Conversation
…ializeProvider Pin @stacks/connect to 8.2.5 (from ^8.2.2) picking up bundle size improvements, provider regression fixes, and the new initializeProvider API. Pre-initialize WalletConnect only when the user connects with it or when restoring a wallet-connect session from localStorage. Closes #1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Depend on walletConnect?.projectId instead of the walletConnect object to prevent the effect from re-running on every parent render when the prop is passed inline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Disable wallet buttons when the extension is not installed, and disable wallet-connect when no WalletConnect config is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expose available wallets from the provider context, accounting for both extension installation and WalletConnect configuration. Consumers no longer need to manually check wallet availability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow consumers to configure which wallets they want to support via a wallets prop. When omitted, all supported wallets are available. availableWallets is now the intersection of configured wallets and installed wallets, with wallet-connect requiring a projectId. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Throw on mount if wallet-connect is in the wallets array but no walletConnect.projectId was provided. Also wire up the example app to read WalletConnect project ID from VITE_WALLETCONNECT_PROJECT_ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a wallet modal is dismissed without completing (e.g. WalletConnect), the request promise may never settle, leaving the UI stuck on "Connecting...". Expose reset via useConnect so consumers can reset the connection state, matching wagmi's convention. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return all configured wallets with an `available` flag instead of only available ones. Consumers can now show all wallets and disable unavailable ones. Also removes `connectors` from useConnect in favor of useWallets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 25, 2026
Update Quick Start and API docs to reflect useWallets, wallets prop, reset, and removal of connectors from useConnect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 25, 2026
…guard - Move runtime guard from render body to useEffect (React Strict Mode safe) - Add generation counter ref so reset() invalidates in-flight connect() promises - Guard concurrent WalletConnect.initializeProvider calls with wcInitRef Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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
@stacks/connectfrom^8.2.2to8.2.5WalletConnect.initializeProvider()for faster WC connections and session restoreswalletsprop toStacksWalletProviderto configure which wallets are supporteduseWalletshook — returns configured wallets with{ id, available }shaperesettouseConnect— clears stuck connecting state when wallet modals are dismissedwallet-connectis inwalletswithoutwalletConnect.projectIdconnectorsfromuseConnect(replaced byuseWallets)useEffect)reset()not cancelling in-flightconnect()promises (generation counter prevents stale state)initializeProviderrace between session restore and connectChanges since @stacks/connect 8.2.2
8.2.5 (2026-02-20)
WalletConnect.initializeProviderfor independent initialization (stx-labs/connect#472)@reown/appkitto reduce initial bundle size (stx-labs/connect#494)8.2.4 (2025-12-17)
8.2.3 (2025-11-25)
New public API
walletspropuseWalletsreset(viauseConnect)Known issues
@stacks/connectrequest()promise never rejects when WalletConnect modal is dismissedreset()is the consumer-side workaround for both casesTest plan
Closes #1
🤖 Generated with Claude Code