Browse Source

Fix 'atto balance' for unopened accounts with nothing pending

xno
codesoap 9 months ago
parent
commit
312ec3695d
  1. 3
      cmd/atto/main.go

3
cmd/atto/main.go

@ -133,6 +133,9 @@ func printBalance() error { @@ -133,6 +133,9 @@ func printBalance() error {
firstReceive := false // Is this the very first block of the account?
info, err := account.FetchAccountInfo(node)
if err == atto.ErrAccountNotFound {
// Needed for printing balance, even if nothing is pending:
info.Balance = "0"
firstReceive = true
} else if err != nil {
return err

Loading…
Cancel
Save