Skip to content
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

How can I fully disconnect from the wallet on the frontend #25

Open
tingshuai opened this issue Nov 24, 2024 · 7 comments
Open

How can I fully disconnect from the wallet on the frontend #25

tingshuai opened this issue Nov 24, 2024 · 7 comments

Comments

@tingshuai
Copy link

tingshuai commented Nov 24, 2024

Package version

v2.3.2

Package configuration

No response

Description

When I use ”disconnect“ func to disconnect from the wallet, it doesn't actually fully disconnect. The connection with the Dapp is only completely severed if I disconnect from the wallet itself. How can I fully disconnect from the wallet on the frontend?

image

As shown in my screenshot, after I click "logout," the wallet remains in a connected state. If I click "connect" again, it reconnects without requiring wallet approval. So how can I ensure on the frontend that after each logout, the wallet requires approval to reconnect?

@kolirt
Copy link
Owner

kolirt commented Nov 24, 2024

@tingshuai Hello. I'm not sure if it should disconnect. Can you show an example of the code you're using?

@tingshuai
Copy link
Author

tingshuai commented Nov 24, 2024

I'm not sure if it should disconnect. Can you show an example of the code you're using?

The code is like the example code you provided, except that when the user disconnects on the frontend, is there a way to require wallet approval when reconnecting?

@tingshuai
Copy link
Author

connectDemo.mp4

You see, after connecting the wallet for the first time, reconnecting does not require wallet approval. Is there a way to make it so that every time the user disconnects and reconnects, wallet approval is required?

@kolirt
Copy link
Owner

kolirt commented Nov 24, 2024

@tingshuai

It seems that this doesn't work in wagmi v1, which runs this library. You can check out the demo here https://1.x.wagmi.sh/examples/connect-wallet

I'll see if I can add something to the function to make it work properly

@tingshuai
Copy link
Author

I'll see if I can add something to the function to make it work properly

ok

@kolirt
Copy link
Owner

kolirt commented Nov 25, 2024

@tingshuai

Hello. I found a way to do this. I think I'll be able to upload the update tomorrow

@tingshuai
Copy link
Author

tingshuai commented Nov 26, 2024

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants