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 to disconnect to wallet, and how to remove connected sites? #47

Open
cloud6605 opened this issue Jun 22, 2024 · 1 comment
Open

Comments

@cloud6605
Copy link
Collaborator

I'm building a dAPP and integrating unisat into it. I'm able to prompt the user to connect unisat by calling window.unisat.requestAccounts(), but there's no method to disconnect. I can remove my app's internal state and show "Disconnected", but once I try to reconnect, it does so automatically, instead of prompting the user as Metamask, for example, does everytime someone connects. So actually, the dApp is still connected, at least from the wallet POV.
The closes to disconnect is removing the connected site from the Wallet extension itself by clicking on "Dapp Connected"

and removing the site, but there's no option to do so in the window.unisat object. It seems the option that needs to be exposed (whether directly through window.unisat or indirectly somehow) is the removeConnectedSite method.

@cloud6605
Copy link
Collaborator Author

Unisat wallet does not provide a direct disconnection method.
When the user chooses to disconnect in the dapp, the dapp should record this status and not actively connect.

As for removing connected sites, we doesn't provide this method yet. I'll write down this request and forward to our team.

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

No branches or pull requests

1 participant