0xHabitat / rosebudDAO

Rosebud DAO
https://rosebud.fund
2 stars 2 forks source link

[WIP] refresh app correctly when user logout from mm #41

Closed PumpkingWok closed 4 years ago

PumpkingWok commented 4 years ago
Description

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
Testing

I have tested it on chrome in mac os.

Refers/Fixes

Fixes: #30