Merge pull request #1952 from laser/feat/805-warn-lotus-balance

display a little inline warning if balance is zero
This commit is contained in:
Whyrusleeping 2020-06-15 09:19:00 -07:00 committed by GitHub
commit 87e5c38e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,12 @@ var walletBalance = &cli.Command{
return err
}
fmt.Printf("%s\n", types.FIL(balance))
if balance.Equals(types.NewInt(0)) {
fmt.Printf("%s (warning: may display 0 if chain sync in progress)\n", types.FIL(balance))
} else {
fmt.Printf("%s\n", types.FIL(balance))
}
return nil
},
}