cli: prettify transfer error

Let the user know what's wrong when cannot find suitable token.
This commit is contained in:
Anna Shaleva 2020-11-13 12:43:56 +03:00
parent 31cf71fb62
commit 860d2ca7a7

View file

@ -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)
}
}