Describe the bug
web3.eth.accounts and web3.version.network is not immediately populated after resolved promise ethereum.enable()
To Reproduce
Steps to reproduce the behavior:
APPROVEweb3.eth.accounts and web3.version.network has to wait around 30ms to get populated (times are not consistent)Expected behavior
Account and Network variables should be set when .enabled() is resolved.
Browser details (please complete the following information):
Just want report that this is fairly random to me. Sometimes it happens more frequently, sometimes it doesn't.
Hi @zlyojciec and @simondlr, thanks very much for reporting this issue. The error was caused by a race condition between when the ethereum#enable Promise was resolved and when an internal MetaMask configuration store populated. This has been fixed as of 634121de6125d4faab5d815d981e62aff8946290 and new builds can be found here to use for verification.
Don't hesitate to let us know if you experience any additional issues while testing.
Works perfect now. Thank you for quick update!
Most helpful comment
Hi @zlyojciec and @simondlr, thanks very much for reporting this issue. The error was caused by a race condition between when the
ethereum#enablePromise was resolved and when an internal MetaMask configuration store populated. This has been fixed as of 634121de6125d4faab5d815d981e62aff8946290 and new builds can be found here to use for verification.Don't hesitate to let us know if you experience any additional issues while testing.