If I log the two functions, I get two objects, that both contain for example selectedAddress
, but the structure of the objects seem different. I couldn't find a comparison in the documentation.
I did find out that window.web3.currentProvider
and window.ethereum
are equal, but then, what is window.web3
for?
Best Answer
As per the Metamask API documentation:
Edit:
You can see what
window.web3
returns by opening a console in Chrome using "F12" (or whatever browser you're using), and typingwindow.web3
:The same can be done for
window.ethereum
.