My objective (for now) is to display the ether balance as displayed on my Metamask (where I am logged in).
From the Metamask Developers FAQ I took a snipped of code and made some changes. I am able to get the correct address, but the balance is null.
Here is the complete code:
The above code shows in the console (after clicking the button):
Using web wallet address = 0x4b6efab615a5e2c4002d23318b891d7bf673e1d34 balance=null
Question 1: Why does the above code not work? I get no syntax or "async" errors and Metamask shows my balance correctly ... ?
Question 2: From the best practices it is stated to "bundle the version of web3 that is used during development". So I downloaded web3.min.js and "bundled" it (see the comment in the code above). Now I am unsure if that implementation is actually used under the hood. Can I be sure, can I print out the web3 version or so?