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

Add support for AccountsChanged Unisat event #38

Open
gssvv opened this issue Jul 6, 2024 · 1 comment
Open

Add support for AccountsChanged Unisat event #38

gssvv opened this issue Jul 6, 2024 · 1 comment

Comments

@gssvv
Copy link

gssvv commented Jul 6, 2024

Description

Implement logic that would allow to subscribe to accountsChanged event of Unisat extension to update account automatically when user switches between wallets.

Problem Statement/Justification

Currently, in sats-wagmi there's no way to update accounts when the user switches between wallets in the Unisat extension.

Proposed Solution or API

Unisat has documentation on how to listen for accountsChanged event — https://docs.unisat.io/dev/unisat-developer-center/unisat-wallet#accountschanged

Alternatives

No response

Additional Information

I haven't found information regarding other wallets. To my knowledge, Leather and Xverse wallets don't have such events. However, this is a subject for research.

@gregdhill
Copy link
Contributor

gregdhill commented Sep 23, 2024

I think this is already possible @gssvv unless I'm mistaken? Maybe this was fixed in a newer update

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

2 participants