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

Feature Request: Support for Account and Network Change Listeners #117

Closed
stoXmod opened this issue Apr 23, 2024 · 3 comments
Closed

Feature Request: Support for Account and Network Change Listeners #117

stoXmod opened this issue Apr 23, 2024 · 3 comments
Assignees
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@stoXmod
Copy link

stoXmod commented Apr 23, 2024

Description

In the Unisat wallet, we can listen for account and network changes using the following event listeners:

unisat.on('accountsChanged', handleAccountsChanged);
unisat.on('networkChanged', handleNetworkChanged);

This feature is crucial for maintaining the app's responsiveness to changes in the user's wallet settings, such as switching accounts or networks, which is common in blockchain applications.

Solution

I suggest adding support for event listeners in the Xverse wallet that can handle 'accountsChanged' and 'networkChanged' events. This would make the wallet more versatile and user-friendly, particularly for applications that need to react in real-time to changes in the user's wallet configuration.

Ideally, the implementation would allow developers to use event listeners similar to those in Unisat.

xverse.on('accountsChanged', handleAccountsChanged);
xverse.on('networkChanged', handleNetworkChanged);

Benefits:

  • Enhances user experience by allowing real-time application updates in response to wallet changes.
  • Aligns Xverse wallet's functionality with other popular wallets like Unisat, potentially increasing its adoption.
  • Supports developers in building more robust and interactive blockchain applications.
@stoXmod
Copy link
Author

stoXmod commented Apr 23, 2024

I would love to hear, if is there currently any workaround for this. 🤔

@teebszet teebszet added the enhancement New feature or request label May 29, 2024
@teebszet teebszet self-assigned this May 29, 2024
@teebszet
Copy link
Member

hi @stoXmod, thanks for the suggestion!

I can confirm this is in our roadmap and will be included very soon 👀

@teebszet
Copy link
Member

duplicate of: #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants