-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fix/auto reconnect #34
Conversation
✅ Deploy Preview for solana-wallets-vue-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@lorisleiva if you could that a look when you have time, that would be great :). If you have any comments or questions, please let me know 🙏 . URL to test: https://deploy-preview-34--solana-wallets-vue-demo.netlify.app/. Related issue: #27 One thing I haven't been able to verify is whether |
Hi there 👋 It's extremely difficult to grasp the changes of this PR with all the linting changes. This PR claims to fix the auto-connect issue but I can't find which part of the code is trying to do that. I'm also struggling the understand what this piece of code achieves since, import { Buffer } from 'buffer';
window.Buffer = Buffer; Would you be able to create a PR that just focuses on fixing that issue and, once that's working, I'm happy to accept infrastructure improvement such as better linting, etc. Thank you for your work! |
Hello! I understand that. 👍 It did become quite much when there was a domino effect of outdated packages. Since I don't have the time to create new separate PRs for it, unfortunately I cannot continue this, sorry. I already went 100% over the allocated time I had for this fix. |
I'm wondering if recent changes to Vite have caused the issue as mentioned in #27 (Wallet not stays connected), so I decided to update vite in this package. Then I got into the update rabbit hole as things didn't compile anymore. I also made it easier for collaborators to run the demo locally, as I wanted a shorter debug cycle.
http-server
dev dependency for easily running the demosignTransaction
in demo work againLet's have the demo be deployed by this PR and then people that have the issue test it, as I don't have it locally on my demo after these updates.
The React package also struggled with the same issue, as seen in anza-xyz/wallet-adapter#527. I'm finding it hard to replicate/pinpoint the issue in this package.
Update:
I found out it's a timing issue. A while back the
beforeunload
changed tounload
which caused the wallet adapter to sometimes trigger a disconnect event and clear the storage. I made it so that it's explicitly cleared only when the user disconnects, and not on any disconnect. (e.g. caused by the browser.)