0

How could I detect this error when the metamask modal shows up and user clicks reject? I'm using ether.js and web3Modal.

enter image description here

1 Answer 1

1

Could you not use a try catch? Then in the catch you can watch for the 4001 which is specifically used for user requests denied.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.