Skip to content

Fix Thirdweb Wallet Disconnect Null Reference #106

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

Merged

Conversation

jeffgamedev
Copy link
Contributor

This issue occurred in our project, where the case is that the client has already logged in from a previous session, and we've saved the wallet address. The user then disconnects the wallet, and we clear the wallet address from local storage, and tell Thirdweb to disconnect the current wallet. This results in a null reference exception, as no Thirdweb connection was needed. The solution is to not access the wallet if it is null, and throw a warning instead.

  • Do not access active wallet if it is null.
  • Add warning.

@0xFirekeeper
Copy link
Member

LGTM!

@0xFirekeeper 0xFirekeeper merged commit 3059836 into thirdweb-dev:main Aug 17, 2023
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 this pull request may close these issues.

2 participants