cli: remove explicit client.Init() calls

This is done inside `GetRPCClient()`.
This commit is contained in:
Evgenii Stratonikov 2020-12-03 14:59:38 +03:00
parent 2d7b823f25
commit 8be9158e2f
2 changed files with 0 additions and 15 deletions

View file

@ -500,9 +500,6 @@ func invokeInternal(ctx *cli.Context, signAndPush bool) error {
if err != nil {
return err
}
if err = c.Init(); err != nil {
return err
}
resp, err = c.InvokeFunction(script, operation, params, cosigners)
if err != nil {

View file

@ -158,10 +158,6 @@ func getNEP17Balance(ctx *cli.Context) error {
if err != nil {
return cli.NewExitError(err, 1)
}
err = c.Init()
if err != nil {
return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1)
}
name := ctx.String("token")
@ -366,10 +362,6 @@ func multiTransferNEP17(ctx *cli.Context) error {
if err != nil {
return cli.NewExitError(err, 1)
}
err = c.Init()
if err != nil {
return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1)
}
if ctx.NArg() == 0 {
return cli.NewExitError("empty recipients list", 1)
@ -433,10 +425,6 @@ func transferNEP17(ctx *cli.Context) error {
if err != nil {
return cli.NewExitError(err, 1)
}
err = c.Init()
if err != nil {
return cli.NewExitError(fmt.Errorf("failed to init RPC client: %w", err), 1)
}
toFlag := ctx.Generic("to").(*flags.Address)
to := toFlag.Uint160()