diff --git a/cli/nep17_test.go b/cli/nep17_test.go index 2d00dfbfb..b318616d1 100644 --- a/cli/nep17_test.go +++ b/cli/nep17_test.go @@ -106,6 +106,7 @@ func TestNEP17Balance(t *testing.T) { t.Run("Bad token", func(t *testing.T) { e.Run(t, append(cmd, "--token", "kek")...) e.checkNextLine(t, "^\\s*Account\\s+"+validatorAddr) + e.checkNextLine(t, `^\s*Can't find data for "kek" token\s*`) e.checkEOF(t) }) t.Run("Bad wallet", func(t *testing.T) { diff --git a/cli/wallet/nep17.go b/cli/wallet/nep17.go index 3ef164bbe..891bd0adc 100644 --- a/cli/wallet/nep17.go +++ b/cli/wallet/nep17.go @@ -13,6 +13,7 @@ import ( "github.com/nspcc-dev/neo-go/cli/input" "github.com/nspcc-dev/neo-go/cli/options" "github.com/nspcc-dev/neo-go/cli/paramcontext" + "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/encoding/fixedn" @@ -20,7 +21,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpcclient" "github.com/nspcc-dev/neo-go/pkg/rpcclient/actor" "github.com/nspcc-dev/neo-go/pkg/rpcclient/gas" - "github.com/nspcc-dev/neo-go/pkg/rpcclient/invoker" "github.com/nspcc-dev/neo-go/pkg/rpcclient/neo" "github.com/nspcc-dev/neo-go/pkg/rpcclient/nep11" "github.com/nspcc-dev/neo-go/pkg/rpcclient/nep17" @@ -100,8 +100,21 @@ func newNEP17Commands() []cli.Command { Name: "balance", Usage: "get address balance", UsageText: "balance -w wallet [--wallet-config path] --rpc-endpoint [--timeout