walletconnect-monorepo
walletconnect-monorepo copied to clipboard
Do not reopen modal when using disconnect()
Hey, when I call disconnect(), the modal reopens; any way to disable this? I want to fully disconnect and use the app as a guest/unknown user
@hazae41 Are you using the walletconnect web3-provider?
Yes
I might be seeing the same issue. What seems to be happening in my case is that after calling WalletConnectProvider.close()
, WalletConnectProvider.handleRequest
is called again which in turn calls getWalletConnector
which triggers a new call to the connector's createSession
. Is that what seems to be happening in your case?
I don't know, it just reopens when I call .disconnect()
+1
Implemented a workaround of extending WalletConnect
to override createSession
https://github.com/energywebfoundation/iam-client-lib/commit/42ee4391701a66161d1a3a2c8cbac5e5aaf143d4#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26
+1
The only workaround I had is to use the standalone client and use my own Web3 layer https://docs.walletconnect.org/quick-start/dapps/client
+1 This is still an issue for me in web3-provider v1.7.1. Thanks for your help @jrhender .
+1
+1
+1
+1
+1
+1 in v1.7.8
+1
The only workaround I had is to use the standalone client and use my own Web3 layer https://docs.walletconnect.org/quick-start/dapps/client
what do you mean by your own Web3 layer
? How are you getting a provider instance from the standalone client?
The only workaround I had is to use the standalone client and use my own Web3 layer https://docs.walletconnect.org/quick-start/dapps/client
what do you mean by your
own Web3 layer
? How are you getting a provider instance from the standalone client?
Even better, I'm gonna build my own client and modal.
@hazae41 is this still an issue?