fix: migrate wallet flow to @stacks/connect v8 (Leather deprecated the legacy bridge) - #17
Merged
Merged
Conversation
Leather deprecated the legacy StacksProvider bridge, which left
openContractCall requests hanging forever with no popup (dangling
promise behind the 'Confirm the transaction in your wallet' toast) —
create-stream and every other signing flow was broken for users on
current wallet versions.
- Auth: connect() + localStorage address storage replaces
UserSession/AppConfig/showConnect; rehydrates via isConnected()/
getLocalStorage().
- Transactions: request('stx_callContract') over the modern
LeatherProvider JSON-RPC bridge replaces openContractCall; explicit
user-rejection handling via JsonRpcError codes (-32000/-31001);
txid normalized to 0x form for the Hiro confirmation poller.
- Deny-by-default post-conditions carry over unchanged; mode mapped
enum -> 'deny'/'allow' string.
Verified end to end on mainnet with Leather: connect popup, stream
creation signed and confirmed on-chain.
|
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.
What
Production-critical fix. Current Leather versions have deprecated the legacy
StacksProviderbridge that@stacks/connectv7'sopenContractCall/showConnectuse — requests go out and are never serviced, so the app hangs on "Confirm the transaction in your wallet…" with no popup, forever. Every signing flow (create, claim, pause, cancel, top-up, register) was affected for users on up-to-date wallets.Console evidence from the live site:
Deprecation warning: The provider object is deprecated. Use 'LeatherProvider' instead(Leather's inpage.js).Changes
@stacks/connect7 → 8.2.6stacks-provider.tsx):connect()+ localStorage address storage replacesUserSession/AppConfig/showConnect; rehydrates viaisConnected()/getLocalStorage()use-stacks-tx.ts):request('stx_callContract')over the modern LeatherProvider JSON-RPC bridge replaces theopenContractCallpromise wrapper; user-rejection handled viaJsonRpcErrorcodes; txid normalized to0xform for the Hiro confirmation poller'deny'/'allow')Verified
npm run buildpasses