-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WalleConnectV2 deactivate #940
Comments
To handle disconnecting WalletConnectV2 on page refresh or maintaining connectivity across refreshes, you can follow these steps: Disconnecting WalletConnectV2 on Page RefreshTo disconnect WalletConnectV2 when the page is refreshed, you can listen for the beforeunload event and call the disconnect method on the WalletConnectV2 instance. Here’s an example:
This code ensures that WalletConnectV2 disconnects when the user refreshes the page. Maintaining Connectivity Across RefreshesTo maintain connectivity after a page refresh, you need to save the connection state and restore it on page load. Here’s how you can implement this: 1. Store the Connection State:
2. Reconnect on Page Load: On page load, check for an existing session in localStorage and reconnect using that session.
|
How do I disconnect WalleConnectV2 when I refresh the page? Or how to maintain connectivity? Can anyone help me.
The text was updated successfully, but these errors were encountered: