From 860d2ca7a79a9a579457b583d92bb5f25b429dd0 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 13 Nov 2020 12:43:56 +0300 Subject: [PATCH] cli: prettify `transfer` error Let the user know what's wrong when cannot find suitable token. --- cli/wallet/nep5.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/wallet/nep5.go b/cli/wallet/nep5.go index 7ad69463d..35f228712 100644 --- a/cli/wallet/nep5.go +++ b/cli/wallet/nep5.go @@ -445,7 +445,7 @@ func transferNEP5(ctx *cli.Context) error { fmt.Fprintln(ctx.App.ErrWriter, "Can't find matching token in the wallet. Querying RPC-node for balances.") token, err = getMatchingTokenRPC(ctx, c, from, ctx.String("token")) if err != nil { - return cli.NewExitError(err, 1) + return cli.NewExitError(fmt.Errorf("failed to get matching token: %w", err), 1) } }