wevm / wagmi

Reactive primitives for Ethereum apps
https://wagmi.sh
MIT License
5.92k stars 1.02k forks source link

Exodus wallet freezes on 'wallet_revokePermissions' method #4064

Closed alx-khramov closed 3 months ago

alx-khramov commented 3 months ago

Check existing issues

Describe the bug

Hey! Just letting you know, that some wallets may freeze here: https://github.com/wevm/wagmi/blob/b4d9ef79deb554ee20fed6666a474be5e7cdd522/packages/core/src/connectors/injected.ts#L271-L274

For example, Exodus wallet awaits this request for 5 minutes (until timeout I guess) and only after that it disconnects. The disconnect transaction stays in the pending state for that time period.

I understand that the problem is on the wallet's side, and I'm going to report it to the Exodus team, but maybe it would be good to add some short timeout forwallet_revokePermissions request on the wagmi side.

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

What Wagmi package(s) are you using?

wagmi, @wagmi/core

Wagmi Version

2.10.2

Viem Version

2.13.3

TypeScript Version

No response

Anything else?

No response

tmm commented 3 months ago

If anyone wants to pick this up, all you need to do is add a withTimeout call similar to what we do in the safe connector.

MukulKolpe commented 3 months ago

Hey @tmm, can I work on this issue?

alx-khramov commented 3 months ago

@MukulKolpe I'm already preparing the PR

github-actions[bot] commented 3 months ago

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.