diff --git a/cli/multisig_test.go b/cli/multisig_test.go index 337f4d81e..f64c0335e 100644 --- a/cli/multisig_test.go +++ b/cli/multisig_test.go @@ -76,7 +76,7 @@ func TestSignMultisigTx(t *testing.T) { "--out", txPath) e.In.WriteString("pass\r") - e.Run(t, "neo-go", "wallet", "multisig", "sign", + e.Run(t, "neo-go", "wallet", "sign", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", wallet2Path, "--address", multisigAddr, "--in", txPath, "--out", txPath) @@ -100,7 +100,7 @@ func TestSignMultisigTx(t *testing.T) { "--", strings.Join([]string{multisigHash.StringLE(), ":", "Global"}, "")) e.In.WriteString("pass\r") - e.Run(t, "neo-go", "wallet", "multisig", "sign", + e.Run(t, "neo-go", "wallet", "sign", "--rpc-endpoint", "http://"+e.RPC.Addr, "--wallet", wallet2Path, "--address", multisigAddr, "--in", txPath, "--out", txPath) diff --git a/cli/wallet/multisig.go b/cli/wallet/multisig.go index 4c730a33b..ddb18f54d 100644 --- a/cli/wallet/multisig.go +++ b/cli/wallet/multisig.go @@ -10,29 +10,7 @@ import ( "github.com/urfave/cli" ) -func newMultisigCommands() []cli.Command { - signFlags := []cli.Flag{ - walletPathFlag, - outFlag, - inFlag, - cli.StringFlag{ - Name: "address, a", - Usage: "Address to use", - }, - } - signFlags = append(signFlags, options.RPC...) - return []cli.Command{ - { - Name: "sign", - Usage: "sign a transaction", - UsageText: "multisig sign --wallet --address
--in --out ", - Action: signMultisig, - Flags: signFlags, - }, - } -} - -func signMultisig(ctx *cli.Context) error { +func signStoredTransaction(ctx *cli.Context) error { wall, err := openWallet(ctx.String("wallet")) if err != nil { return cli.NewExitError(err, 1) diff --git a/cli/wallet/wallet.go b/cli/wallet/wallet.go index f9334a84b..b9f461e9a 100644 --- a/cli/wallet/wallet.go +++ b/cli/wallet/wallet.go @@ -69,6 +69,16 @@ func NewCommands() []cli.Command { }, } claimFlags = append(claimFlags, options.RPC...) + signFlags := []cli.Flag{ + walletPathFlag, + outFlag, + inFlag, + cli.StringFlag{ + Name: "address, a", + Usage: "Address to use", + }, + } + signFlags = append(signFlags, options.RPC...) return []cli.Command{{ Name: "wallet", Usage: "create, open and manage a NEO wallet", @@ -191,9 +201,11 @@ func NewCommands() []cli.Command { }, }, { - Name: "multisig", - Usage: "work with multisig address", - Subcommands: newMultisigCommands(), + Name: "sign", + Usage: "cosign transaction with multisig/contract/additional account", + UsageText: "sign --wallet --address
--in --out ", + Action: signStoredTransaction, + Flags: signFlags, }, { Name: "nep17",