'WalletConnect & web3js - how to forget previously set wallet?
I'm writig a dApp using web3Modal and web3js libraries. I have an issue regarding the WalletConnect provider.
Upon choosing to connect using WalletConnect, the QR code doesn't show up and I'm immeidatly connected to the previous (old local test network..) wallet.
I tried looking for an option in the WalletConnectProvider api and the web3js libraries, without success.
Openning the website in incognitio mode DOES work, but loading the page without using cache does not work (ctrl+shift+f5 on chrome), nor does disabling cache using html headers.
I'm not sure what am I missing, as it's clearly saved somewhere but not in the cache.
Solution 1:[1]
First you need to use connector.killSession()
and then clear local storage.
Solution 2:[2]
Solution: clear local storage using localStorage.clear(). More granulaity should be possible if need be.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Yur D |
Solution 2 | blades |