mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
cli: remove explicit client.Init()
calls
This is done inside `GetRPCClient()`.
This commit is contained in:
parent
2d7b823f25
commit
8be9158e2f
2 changed files with 0 additions and 15 deletions
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue