fix: disconnect keychain before emitting state changes#2505
Conversation
emitAccountsChanged([]) triggers starknet-react state updates that can cause the page to reload or navigate before keychain.disconnect() is called, leaving the iframe localStorage intact. Move the keychain disconnect and iframe close before emitting so the cleanup completes before any framework re-render. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @broody's task —— View job Analyzing PR for documentation impact
Analysis CompleteNo documentation updates needed. This PR fixes an internal implementation bug where the order of operations in Why no docs updates:
The existing documentation in
This fix ensures that behavior actually works as documented. |
Summary
keychain.disconnect()andthis.close()to run beforeemitAccountsChanged([])inControllerProvider.disconnect()emitAccountsChanged([])triggers starknet-react state updates that can cause the page to reload/navigate before the keychain disconnect completes, leaving iframe localStorage intactTest plan
useAccount/useConnectstate after disconnect🤖 Generated with Claude Code