From 7553c1ac9679560f8ffb0f8f2a731fc41c949026 Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Wed, 3 Mar 2021 16:00:04 +0300 Subject: [PATCH] cli/wallet: process signers in order --- cli/wallet/multisig.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cli/wallet/multisig.go b/cli/wallet/multisig.go index 762b61e10..cae728780 100644 --- a/cli/wallet/multisig.go +++ b/cli/wallet/multisig.go @@ -47,15 +47,18 @@ func signStoredTransaction(ctx *cli.Context) error { } } if len(ctx.String(options.RPCEndpointFlag)) != 0 { - w, err := c.GetWitness(acc.Contract.ScriptHash()) - if err != nil { - return cli.NewExitError(err, 1) + for i := range tx.Signers { + w, err := c.GetWitness(tx.Signers[i].Account) + if err != nil { + return cli.NewExitError(err, 1) + } + tx.Scripts = append(tx.Scripts, *w) } - tx.Scripts = append(tx.Scripts, *w) gctx, cancel := options.GetTimeoutContext(ctx) defer cancel() + var err error // `GetRPCClient` returns specialized type. c, err := options.GetRPCClient(gctx, ctx) if err != nil { return cli.NewExitError(err, 1)