0

As it is said in EIP-1102, this standard is meant to prevent a dapp would gain an ability to have access to user's accounts via the ethereum provider without their permission. For the sake of it an eth_requestAccounts method was defined, which should return a promise, and the latter will either be resolved with an array of accounts or be rejected with an error if, for example, the user denies access.

Metamask claims it is in line with this standard. However, I found that it does not require any user confirmation of reading their account. Specifically, this line of code just results in a promise resolved with the user's account. No user interface would be triggered meanwhile:

 ethereum.request({ method: 'eth_requestAccounts' })

The consent will be requested only when the dapp trys to use this account to send a transaction.

Any thought on why did Metamask choose this way, which is allegedly contrary to the EIP-1102?

1 Answer 1

0

MetaMask is in line with this approach, it asks at first to the user to allow app (domain) to access their accounts, and then it asks for confirmation for each transaction sent. For the allowance it just ask once at the beginning for each domain, though.

Are you testing this on a site you already approved the address for?

If so, select the account, click the tree vertical dots on the top-right, select "connected sites". A list appears, and from there you can remove permission for each previously allowed site.

2
  • Yes, you are right, I missed it. Btw, do you know how my consent can be withdrawn for a domain? I have not found this option in the settings. Oct 20, 2021 at 10:09
  • Yes, it's a bit hidden. Select the account, click the tree vertical dots on the top-right, select "connected sites". A list appears, and from there you can remove permission for each previously allowed site. Oct 21, 2021 at 16:30

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.