refactor: don't break SignModeHandler API (#14087)

* refactor: Make SignModeHandler update not API breaking

* changelog

* fix tests

* add comment

* Revert rosetta

* address reviews

* shorter name

* Fix test build
This commit is contained in:
Amaury
2022-12-01 16:20:10 +01:00
committed by GitHub
parent 37a9bc3bb6
commit fb4d964f7e
22 changed files with 92 additions and 49 deletions
+3 -3
View File
@@ -1,7 +1,6 @@
package sims
import (
"context"
"math/rand"
"testing"
"time"
@@ -62,8 +61,9 @@ func GenSignedMockTx(r *rand.Rand, txConfig client.TxConfig, msgs []sdk.Msg, fee
Sequence: accSeqs[i],
PubKey: p.PubKey(),
}
// 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())
// When Textual is wired up, use GetSignBytesWithContext
// ref: https://github.com/cosmos/cosmos-sdk/issues/13747
signBytes, err := txConfig.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx())
if err != nil {
panic(err)
}