-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor for latest Metamask changes #201
Conversation
…ethernaut into upgrade-to-latest-metamask
Co-authored-by: Francisco Giordano <[email protected]>
There are a couple of MetaMask deprecation notices in the console; not sure if it is in scope for this PR, so just mentioning in case helpful:
Related: #188 |
Yes, apparently there's no way right now to get rid of them. They are given by the Web3. Apparently, because of backward compatibility, they decided to not remove them for the time being. You can read more about it here and here. You can still see them being used |
I deleted my last comment - apologies for the false notification - I switched off Rinkeby in the middle of testing and forgot to switch back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @xaler5 , thanks for fixing this so fast. Hope it gets pushed to prod fast and we all can enjoy Ethernaut again!
@@ -47,14 +47,12 @@ window.addEventListener('load', async() => { | |||
if (window.ethereum) { | |||
window.web3 = new constants.Web3(window.ethereum) | |||
try { | |||
await window.ethereum.enable() | |||
await window.ethereum.request({method: `eth_requestAccounts`}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should never initiate a connection request on page load.
Though, it should be address as a separate issue. Let's bring it back ASAP.
Thank you all for working on this and reviewing it! |
Co-authored-by: Dario <[email protected]> Co-authored-by: Francisco Giordano <[email protected]>
Resolves #198
Resolves #200
and partially #188