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

getActiveSessions continues to return disconnected session #4484

Open
mihoward21 opened this issue Apr 30, 2024 · 2 comments
Open

getActiveSessions continues to return disconnected session #4484

mihoward21 opened this issue Apr 30, 2024 · 2 comments
Labels
type: bug Something isn't working

Comments

@mihoward21
Copy link

mihoward21 commented Apr 30, 2024

Describe the bug
My web3wallet integration is working just fine. I can connect to dapps, I can disconnect from my wallet and I can also disconnect from the dapp and I receive the proper event in the wallet and handle it.

On a hard refresh of my wallet, I use getActiveSessions to refresh the UI with the already open sessions, that works great.

If the user closes the wallet, then on the dapp side they do a disconnect, then they reopen the wallet, I'm having trouble handling that case. getActiveSessions is still returning those sessions for me. I don't know how to check if they are still active or not. Even setting a 10 second timeout and calling getActiveSessions again still returns the same sessions that were disconnected. I have to do another hard refresh of my wallet app, and then after that calling getActiveSessions no longer returns the disconnected session.

This feels like a bug with getActiveSessions? Unless there is something else I need to be doing to validate these sessions. I'm not receiving any 'session_delete' event in this case (since the wallet is closed at the time the session is disconnected). I thought maybe I'd receive that event after reopening the wallet, but I'm not seeing it. Clearly the wallet is receiving some data about the session being disconnected though, because a hard refresh fixes the issue.

Feels like it may just be a timing issue? Something with my setup? Couldn't find anything in the docs about this.

SDK Version (if relevant)
Version 1.11.2 of @walletconnect/web3wallet
It's a web wallet, so everything is in the browser

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@mihoward21 mihoward21 added the type: bug Something isn't working label Apr 30, 2024
Copy link

linear bot commented Apr 30, 2024

@ganchoradkov
Copy link
Member

Hey @mihoward21 thanks for the report. Could you prepare minimal repo example where we can reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants