From 7246ffc77c9643228d4e2208182d3f13fea1cc25 Mon Sep 17 00:00:00 2001 From: Peter Siemens Date: Tue, 6 Apr 2021 22:42:17 -0700 Subject: [PATCH] Print account balance as UFix64 --- internal/accounts/accounts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/accounts/accounts.go b/internal/accounts/accounts.go index e24f261a2..2ff688c42 100644 --- a/internal/accounts/accounts.go +++ b/internal/accounts/accounts.go @@ -23,6 +23,7 @@ import ( "fmt" "text/tabwriter" + "github.com/onflow/cadence" "github.com/onflow/flow-go-sdk" "github.com/spf13/cobra" ) @@ -85,7 +86,7 @@ func (r *AccountResult) String() string { writer := tabwriter.NewWriter(&b, 0, 8, 1, '\t', tabwriter.AlignRight) fmt.Fprintf(writer, "Address\t 0x%s\n", r.Address) - fmt.Fprintf(writer, "Balance\t %d\n", r.Balance) + fmt.Fprintf(writer, "Balance\t %s\n", cadence.UFix64(r.Balance)) fmt.Fprintf(writer, "Keys\t %d\n", len(r.Keys))