I am calling the MetaMask promt successfully with this:

ethereum.enable().then(response => {
}).catch(error => {

However, when I disagree with the prompt and do not allow the connect request, it returns "ABC" but I should get "XYZ". I also found out, that the code response now is completely different. A few weeks ago my above script worked fine. Only the error does not work. When I accept the connection, everything works fine and it successfully returns "ABC".

enter image description here I even could get the exact code return, with "error["code"] == "4001"" I made sure that the error was, that the user has cancelled the connect request. Now the error return is no longer the same, for example it was "-32603".

What happened?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.