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

Wallet disconnects when reloading the page #630

Open
RaymondDashWu opened this issue Apr 25, 2022 · 1 comment
Open

Wallet disconnects when reloading the page #630

RaymondDashWu opened this issue Apr 25, 2022 · 1 comment

Comments

@RaymondDashWu
Copy link
Contributor

This happens when a manual reload is done (devnet toggle switch), pressing F5, etc. Another possible edge case could happen when switching to different wallets.

@masayafunakoshi1
Copy link
Contributor

masayafunakoshi1 commented Apr 27, 2022

I'll try to continue working on this, but incase anyone wants to give it a go here's what is wanted out of functionality:

  • Reconnect wallet automatically if wallet is never disconnected manually (as long as it's the same browser session)
    - On refresh or change to devnet/mainnet
    - Try not to store wallet info into local storage/session storage/cookies
  • Must manually reconnect and ask for re-login to wallet IF it is a different browser session
  • Must not ask a user to login to their wallet on site load UNTIL they manually click the connect wallet button, especially for new users

BONUS: Figure out a way to change the wallet connected on the site as you switch wallets within your Phantom wallet

Here's a CodeSandbox that can give insight into all of this: https://codesandbox.io/s/github/phantom-labs/sandbox?file=/src/App.tsx

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