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: ethers disconnection error #2683

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

tomiir
Copy link
Contributor

@tomiir tomiir commented Aug 9, 2024

Description

For some wallets, a message saying Failed to disconnect appeared after clicking the disconnectbutton.
This had 2 root causes:

  • Wallet does not implement wallet_revokePermissions (eg Phantom)

  • Provider does not implement emit (eg when using Trust)

  • Changed behavior so that we don't throw on revoke permissions, since it's not a required step.

  • Changed behavior to optionally call emit if available

  • Brought ethers5 up to speed on disconnect flow as revokePermissions was never implemented there

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-848

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests) => The test is there but no way to test extensions for it yet other than MM which works perfectly
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections

Copy link

linear bot commented Aug 9, 2024

Copy link

vercel bot commented Aug 9, 2024

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

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Aug 9, 2024 9:06am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Aug 9, 2024 9:06am

@tomiir tomiir merged commit cb83cd8 into main Aug 9, 2024
11 checks passed
@tomiir tomiir deleted the tomas/apkt-848-error-while-disconnecting-on-ethers branch August 9, 2024 09:23
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.

None yet

2 participants