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

fix: listener callback should bind this #37

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

nieheyong
Copy link

when disconnect from wallet app,this lib will throw below error:

TypeError: this.resetAccount is not a function
    at EventEmitter.syncAccount (appKitClient.js:93:1)
    at EventEmitter.emit (events.js:158:1)
    at Zt.deleteSession (index.es.js:1:1)
    at async EventEmitter.<anonymous> (index.es.js:1:1)

It is because forget bind this for listener callback

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
walletconnect-solana ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 5:41pm

@glitch-txs
Copy link

Hello, how can I reproduce the issue?

@nieheyong
Copy link
Author

nieheyong commented Jul 25, 2024

Steps to reproduce

  1. open playground web page, open chrome devtools console
  2. slect wallet > More options > WalletConnect
  3. select a wallet, for example MathWallet, scan and connect ,page show connect success
  4. after connect success, click disconnect inside MathWallet app
  5. chrome devtools console will show error

@nieheyong
Copy link
Author

@glitch-txs Can you reproduce the issue according to my steps ?

@glitch-txs
Copy link

Thank you, I'll add a direct binding in other PR, I'm also adding you as contributor on release notes 👍

@glitch-txs
Copy link

closing in favor of #39

@glitch-txs glitch-txs closed this Jul 29, 2024
@glitch-txs glitch-txs reopened this Jul 29, 2024
@glitch-txs glitch-txs merged commit 441667e into WalletConnect:main Jul 29, 2024
2 checks passed
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