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
@@ -2,6 +2,7 @@ package rosetta
import (
"bytes"
"context"
"encoding/json"
"fmt"
"reflect"
@@ -114,7 +115,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(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signerData, tx)
bytesToSign, err := cfg.SignModeHandler().GetSignBytes(context.TODO(), signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signerData, tx)
if err != nil {
return nil, err
}