Skip to content

fix: migrate wallet flow to @stacks/connect v8 (Leather deprecated the legacy bridge) - #17

Merged
jayteemoney merged 1 commit into
mainfrom
fix/stacks-connect-v8
Jul 13, 2026
Merged

fix: migrate wallet flow to @stacks/connect v8 (Leather deprecated the legacy bridge)#17
jayteemoney merged 1 commit into
mainfrom
fix/stacks-connect-v8

Conversation

@jayteemoney

Copy link
Copy Markdown
Owner

What

Production-critical fix. Current Leather versions have deprecated the legacy StacksProvider bridge that @stacks/connect v7's openContractCall/showConnect use — 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/connect 7 → 8.2.6
  • Auth (stacks-provider.tsx): connect() + localStorage address storage replaces UserSession/AppConfig/showConnect; rehydrates via isConnected()/getLocalStorage()
  • Transactions (use-stacks-tx.ts): request('stx_callContract') over the modern LeatherProvider JSON-RPC bridge replaces the openContractCall promise wrapper; user-rejection handled via JsonRpcError codes; txid normalized to 0x form for the Hiro confirmation poller
  • Deny-by-default post-conditions unchanged (mode mapped enum → 'deny'/'allow')

Verified

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.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stackstream Ready Ready Preview, Comment Jul 13, 2026 6:57am

@jayteemoney
jayteemoney merged commit a7fb796 into main Jul 13, 2026
1 of 4 checks passed
@jayteemoney
jayteemoney deleted the fix/stacks-connect-v8 branch July 13, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant