diff --git a/cli/wallet/nep11.go b/cli/wallet/nep11.go index 7481fdb6f..d93d3253f 100644 --- a/cli/wallet/nep11.go +++ b/cli/wallet/nep11.go @@ -184,10 +184,9 @@ func getNEP11Balance(ctx *cli.Context) error { } token, err := getMatchingToken(ctx, wall, name, manifest.NEP11StandardName) if err != nil { - fmt.Fprintln(ctx.App.ErrWriter, "Can't find matching token in the wallet. Querying RPC-node for token info.") tokenHash, err := flags.ParseAddress(name) if err != nil { - return cli.NewExitError(fmt.Sprintf("valid token adress or hash in LE should be specified for RPC-node request: %s", err.Error()), 1) + return cli.NewExitError(fmt.Errorf("can't fetch matching token from RPC-node: %w", err), 1) } token, err = c.NEP11TokenInfo(tokenHash) if err != nil { diff --git a/cli/wallet/nep17.go b/cli/wallet/nep17.go index 549e4c3ba..a7595b0f3 100644 --- a/cli/wallet/nep17.go +++ b/cli/wallet/nep17.go @@ -440,10 +440,9 @@ func multiTransferNEP17(ctx *cli.Context) error { if !ok { token, err = getMatchingToken(ctx, wall, ss[0], manifest.NEP17StandardName) if err != nil { - fmt.Fprintln(ctx.App.ErrWriter, "Can't find matching token in the wallet. Querying RPC-node for balances.") token, err = getMatchingTokenRPC(ctx, c, from, ss[0], manifest.NEP17StandardName) if err != nil { - return cli.NewExitError(err, 1) + return cli.NewExitError(fmt.Errorf("can't fetch matching token from RPC-node: %w", err), 1) } } } @@ -509,10 +508,9 @@ func transferNEP(ctx *cli.Context, standard string) error { to := toFlag.Uint160() token, err := getMatchingToken(ctx, wall, ctx.String("token"), standard) if err != nil { - 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"), standard) if err != nil { - return cli.NewExitError(fmt.Errorf("failed to get matching token: %w", err), 1) + return cli.NewExitError(fmt.Errorf("can't fetch matching token from RPC-node: %w", err), 1) } }