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
+1 -2
View File
@@ -2,7 +2,6 @@ package rosetta
import (
"bytes"
"context"
"encoding/json"
"fmt"
"reflect"
@@ -115,7 +114,7 @@ func NewConverter(cdc *codec.ProtoCodec, ir codectypes.InterfaceRegistry, cfg sd
txDecode: cfg.TxDecoder(),
txEncode: cfg.TxEncoder(),
bytesToSign: func(tx authsigning.Tx, signerData authsigning.SignerData) (b []byte, err error) {
bytesToSign, err := cfg.SignModeHandler().GetSignBytes(context.TODO(), signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signerData, tx)
bytesToSign, err := cfg.SignModeHandler().GetSignBytes(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signerData, tx)
if err != nil {
return nil, err
}