cli/wallet: process signers in order

This commit is contained in:
Evgeniy Stratonikov 2021-03-03 16:00:04 +03:00
parent b9136dbfc0
commit 7553c1ac96

View file

@ -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)