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

check if user connects a address #34

Open
softwarecurator opened this issue Feb 9, 2022 · 3 comments
Open

check if user connects a address #34

softwarecurator opened this issue Feb 9, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on

Comments

@softwarecurator
Copy link

something like

defaultEvmStores.setProvider().then("connected" => //do something)

or

await defaultEvmStores.setProvider() //do something here

because right now it throws no error or anything to indicate that the user didn't connect a address other than checking if $selectedAccount exists

@clbrge clbrge added the enhancement New feature or request label Feb 19, 2022
@clbrge
Copy link
Owner

clbrge commented Feb 19, 2022

I'm not sure this is the correct direction. The whole package is about store. In my opinion the correct pattern should be to subscribe to the selectedAccount and //do something in the subscription handler.

@clbrge clbrge added wontfix This will not be worked on documentation Improvements or additions to documentation and removed enhancement New feature or request labels Mar 5, 2022
@clbrge
Copy link
Owner

clbrge commented Mar 5, 2022

Keeping open so we improve the documentation to explain how to do that the right way...

@yaeszlo
Copy link

yaeszlo commented Sep 28, 2022

This is a very weird approach since when the user rejects the connection the error is thrown, just not passed down to the caller method...
image

Scenario I wish to react on cancellation:

  1. User clicks connect wallet button
  2. Loading-spinner or other loading-awaiting view is shown, perhaps some animation
  3. User clicks cancel - the loading view should be hidden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants