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

Allow disconnecting in programming #212

Open
web3batman opened this issue Jul 8, 2024 · 1 comment
Open

Allow disconnecting in programming #212

web3batman opened this issue Jul 8, 2024 · 1 comment
Assignees

Comments

@web3batman
Copy link

I'm developing a decentralized application (dApp) and integrating UniSat into it. I can prompt the user to connect to UniSat by calling window.unisat.requestAccounts(). However, there is no method available to disconnect. While I can clear my application's internal state and display a "Disconnected" status, attempting to reconnect results in an automatic connection, rather than prompting the user as MetaMask does each time a connection is made. This indicates that the dApp remains connected from the wallet's perspective.

The closest approach to disconnecting is manually removing the connected site from the wallet extension by clicking on "Dapp Connected" and then removing the site. Unfortunately, there is no option to do this programmatically through the window.unisat object. It appears that the method required to achieve this, removeConnectedSite, needs to be exposed either directly through window.unisat or indirectly in some manner.

@gndelia
Copy link

gndelia commented Aug 5, 2024

Duplicated/Related #204 (it's actually a word-by-word copy!)

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

3 participants