-
Notifications
You must be signed in to change notification settings - Fork 513
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
a disconnect error by default value or other reason can not set local storage #2227
Comments
Hi @logsdk can you provide more context for me around what this code is trying to do? |
Hi. const [{ wallet }, disconnect] = useConnectWallet()
await disconnect(wallet) The reason is that the |
@ignromanov Disconnect using the approach as shown above working without issue on our demo sites - https://github.com/blocknative/react-demo/blob/89509379f4cd09299b45b2301769aa80a7c58991/src/App.js#L543 |
The reason was that flags |
@ignromanov does that mean we can close this issue? |
@Adamj1232 I think you should test with these flags set to False. You will get a disconnect error. |
@ignromanov I am still unable to reproduce the disconnect error - I made a video of what I am seeing when trying this locally. https://www.loom.com/share/3d73a7ccfa1645cb9deb820fb8ea438c?sid=93f5efb4-5539-4075-a204-c9ea9dcea605 |
@Adamj1232 I tried it on your test application. Try with these changes to reproduce it. I got an error. |
@ignromanov I am still unable to reproduce an error with that change |
@Adamj1232 Recorded a video reproduction of the error. Launched your repository with the change described above. Screen.Recording.2024-06-14.at.22.53.38.mov |
We are seeing this same issue with the latest version on all packages and brave browser. |
@ignromanov ahh ok I think I got it figured out, required a local storage clear to reproduce. Looking into this today. Will have a fix shortly. |
@ignromanov please give this a shot with the latest alpha version of @web3-onboard/core or framework package noted in the PR above - would love validation on your end prior to release |
Current Behavior
1、connect wallet, tips successful
2、discount wallet, error
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at disconnect (index-34745058.js:3597:25)
at async eval (useConnectWallet.js:25:29)
in packages/core/src/disconnect.ts:47
if can not get last connected wallet, the default value '', can not be parsed by JSON.
Expected Behavior
disconnect wallet successful
Steps To Reproduce
No response
What package is effected by this issue?
@web3-onboard/core
Is this a build or a runtime issue?
Runtime
Package Version
2.22.1
Node Version
No response
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Anything else?
No response
Sanity Check
The text was updated successfully, but these errors were encountered: