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

connect resolves immediately in case of injected provider #24

Open
PaulBernier opened this issue Apr 3, 2021 · 1 comment
Open

connect resolves immediately in case of injected provider #24

PaulBernier opened this issue Apr 3, 2021 · 1 comment

Comments

@PaulBernier
Copy link
Contributor

https://github.com/project-serum/sol-wallet-adapter/blob/master/src/index.js#L69

When using an injected provider the Promise resolve immediately, while for the pop up version it will resolve once the 'connected' even has been received from the pop up. Why this discrepancy of behavior? I believe the later approach is better (i.e the connect method returns only once the user has clicked connect in the UI)

@PaulBernier
Copy link
Contributor Author

Replacing resolve by this.once('connect', resolve); seems to work fine, so I am wondering if that should be changed.

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