ALuhning/VPC_FT

Loop while a login user with no balance

Opened this issue · 0 comments

Hi @ALuhning,
First of all, this repo is very helpful for me. Thank you so much.
But I found a problem.
If the contract is initialized and I use another user account with no balance transferred to login, the UI will changed between initial form and login dashboard.

I think the problem is the false return while get 0 balance.
https://github.com/shiminshen/VPC_FT/blob/master/src/App.js#L108

I think the below code will fix the problem.

          } catch (err) {
            console.log('no balance')
            setAccountBalance(0)
          }