Skip to content

Fix disconnect with walletConnect#300

Merged
technophile-04 merged 5 commits intomainfrom
fix-disconnect-wc
Sep 9, 2025
Merged

Fix disconnect with walletConnect#300
technophile-04 merged 5 commits intomainfrom
fix-disconnect-wc

Conversation

@rin-st
Copy link
Member

@rin-st rin-st commented Aug 21, 2025

Bug appeared because of race condition between disconnect() and signOut(). Changed to async versions and bug disappeared.

Tested with WalletConnect and Metamask app on my phone (android). Note: Sometimes signing messages doesnt work if you open MM app after you click button, which requires signing. So you need to keep MM app open to successfully sign messages

Also see my comments in PR

Fixes #291

cc @escottalexander

@vercel
Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
speedrunethereum-v2 Ready Ready Preview Comment Sep 9, 2025 3:37pm

@carletex carletex removed their request for review August 22, 2025 07:48
@technophile-04
Copy link
Member

For some reason, I wasn't able to reproduce it :(...Like I tried opening SRE on my laptop and connecting with walletConnect from my MM mobile app and it disconnect nicely.

Using:
Arc (chrome based browser)
mac
Iphone

Also tried opening SRE in MM mobile app it also works expected there

also from #291 (comment)

I was able to disconnect on the main home page but not on any challenge pages I tried.

This is strange behaviour since same component is rendered in every page :(


But I think the changes makes sense!! Maybe @rin-st we can also wrap the async in try catch and log error so that next time any simillar bug happens, we can get some hints from console?

Thanks Rinat!

@rin-st
Copy link
Member Author

rin-st commented Aug 25, 2025

I was able to disconnect on the main home page but not on any challenge pages I tried.

This is strange behaviour since same component is rendered in every page :(

For me disconnect from main page also was bugged, sometimes it worked but sometimes is not.

But I think the changes makes sense!! Maybe @rin-st we can also wrap the async in try catch and log error so that next time any simillar bug happens, we can get some hints from console?

Thanks! Updated

Copy link
Member

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Thanks @rin-st!!

Copy link
Member

@Pabl0cks Pabl0cks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to reproduce either :/

Disconnect was/is working nicely to me from challenge page and homepage with this setup:

  • Windows laptop + Chrome
    • WalletConnect with rainbow wallet on mobile (android)
    • WalletConnect with safe wallet from the same laptop

Copy link
Member

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this since it doesn't have side effects and also if next time something similar happens #291 we can get logs 🙌

@technophile-04 technophile-04 merged commit 39fd24f into main Sep 9, 2025
3 checks passed
@technophile-04 technophile-04 deleted the fix-disconnect-wc branch September 9, 2025 15:45
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.

Bug: Can't disconnect wallet on challenge pages

3 participants