[bug] useAccount onConnect onDisconnect
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.5.12 and 0.6.0
Current Behavior
Using this code:
const accountInfo = useAccount({
onConnect: ({ address, connector, isReconnected }) => {
console.log('Connected', { address, connector, isReconnected })
},
onDisconnect: () => {
console.log('Disconnected')
},
}
)
I’m getting the “connected” and “disconnected” log randomly. I haven’t found a pattern. I can reload the web and works, and reload again and stops working.
Expected Behavior
Always trigger onConnect and onDisconnect
Steps To Reproduce
No response
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Flask-SocketIO running app but not firing events
I did a little research and found out that Flask-SocketIO allows you to do that through the 'connect' and 'disconnect' events. However, when...
Read more >Getting error message when trying to access a shared folder in a
Disconnect all pervious connections to the sever or shared resource and try again" ... and click on "Connect using a different user name....
Read more >OnDisconnect | Firebase JavaScript API reference
Reference for OnDisconnect. ... Optional onComplete: (a: Error | null) => any. An optional callback function that will be called when synchronization to...
Read more >Ethereum Provider API - MetaMask Docs
interface ConnectInfo { chainId: string; } ethereum.on('connect', ... ethereum.on('disconnect', handler: (error: ProviderRpcError) => void);.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NextJS Page (for instance index.tsx):
_app.tsx:
packages.json
https://codesandbox.io/s/serverless-wildflower-oh45jm
@Quix44 this was fixed in
wagmi@0.7.4
.