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

Cannot re-connect to Sollet web after closing the window #68

Closed
danmt opened this issue Sep 12, 2021 · 2 comments · Fixed by #70
Closed

Cannot re-connect to Sollet web after closing the window #68

danmt opened this issue Sep 12, 2021 · 2 comments · Fixed by #70

Comments

@danmt
Copy link
Contributor

danmt commented Sep 12, 2021

Overview

As an end-user, if you connect to Sollet web and close the window, you're not capable of connecting again to Sollet web by selecting it again.

Reproduction steps

  • Go to /packages/example
  • Run yarn start
  • Select Sollet web with any of the UI options
  • Connect to the wallet
  • Close the window
  • Select Sollet web again

Expected behavior

As a user I would expect to be able to select Sollet web again and get prompted again. Even after closing the window.

Behavior found

The only way to get prompted again after closing the window is to select another wallet and then select Sollet web again.

Proposed solution

While working on #42 I noticed that if you close the window, an adapter disconnect event is fired leading to a "reset" of the state using initialState. When this happens, the state gets set to its initial value but the "selected wallet name" remains unchanged. I'm not sure if this is happening for the React package as well, but maybe all it takes is to call setName(null) on adapter disconnect.

@jordaaash
Copy link
Collaborator

Wow, thanks for the excellent report. I'll get to the bottom of this. I imagine #64 broke something.

@jordaaash
Copy link
Collaborator

Fixed and published in @solana/wallet-adapter-react 0.10.1

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

Successfully merging a pull request may close this issue.

2 participants