wevm / wagmi

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

Can't catch error #4070

Closed AlansaladA closed 3 months ago

AlansaladA commented 3 months ago

Check existing issues

Describe the bug

When I call the approve method of the contract or operate to import tokens into the wallet(walletClient.data?.watchAsset), if I click reject in metamask, the user rejection cannot be captured in the catch and the execution continues.

But when I try to switch back to version 2.9.9, I can catch the error. I want to know if there is any update on error handler in the new version?

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

What Wagmi package(s) are you using?

wagmi

Wagmi Version

2.10.2

Viem Version

2.15.1

TypeScript Version

No response

Anything else?

No response

github-actions[bot] commented 3 months ago

Hello @AlansaladA.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.

AlansaladA commented 3 months ago

@tmm , I have added a minimal reproduction. Could you please reopen this Issue and take a look? Thank you! The minimal reproduction

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.