The bug was caused by restored variable, in App.js, since i logged in for the first time in rosebud, it always await the initialization of web3, and the restored variable will be false until i log in via Metamask. I moved the setRestored(true) above web3 initialization, in this way the page loads correctly before the web3 init.
But maybe it is not the solution that you are thinking about. For instance the loggedInUser variable could be set to false when someone logged out from Metamask. let me know.
Thanks in advance.
Checklist
[X] Refresh the page correctly even if a user logged out to Metamask.
Description
The bug was caused by
restored
variable, inApp.js
, since i logged in for the first time in rosebud, it alwaysawait
the initialization of web3, and therestored
variable will be false until i log in via Metamask. I moved thesetRestored(true)
above web3 initialization, in this way the page loads correctly before the web3 init. But maybe it is not the solution that you are thinking about. For instance theloggedInUser
variable could be set to false when someone logged out from Metamask. let me know. Thanks in advance.Checklist
Testing
I have tested it on chrome in mac os.
Refers/Fixes
Fixes: #30