refactor!: Add context arg to sign mode handler GetSignBytes (#13701)

* refactor!: Add context arg to sign mode handler `GetSignBytes`

* fix build

* fix tests

* Fix goling

* fix lint

* Fix lint

* Fix test

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Fix tests

* Fix rosetta deps

* fix

* go mod tidy all

* go mod tidy

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Amaury
2022-11-29 18:49:51 +00:00
committed by GitHub
co-authored by Aleksandr Bezobchuk Marko Julien Robert
parent 5a1fa2ee02
commit fffc9d07d5
37 changed files with 88 additions and 60 deletions
+2 -1
View File
@@ -514,7 +514,8 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
WithKeybase(kb).
WithTxConfig(cfg.TxConfig)
err = tx.Sign(txFactory, nodeDirName, txBuilder, true)
// When Textual is wired up, the context argument should be retrieved from the client context.
err = tx.Sign(context.TODO(), txFactory, nodeDirName, txBuilder, true)
if err != nil {
return nil, err
}
+3 -1
View File
@@ -1,6 +1,7 @@
package sims
import (
"context"
"math/rand"
"testing"
"time"
@@ -61,7 +62,8 @@ func GenSignedMockTx(r *rand.Rand, txConfig client.TxConfig, msgs []sdk.Msg, fee
Sequence: accSeqs[i],
PubKey: p.PubKey(),
}
signBytes, err := txConfig.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx())
// When Textual is wired up, the context argument should be retrieved from the client context.
signBytes, err := txConfig.SignModeHandler().GetSignBytes(context.TODO(), signMode, signerData, tx.GetTx())
if err != nil {
panic(err)
}