fix(x/auth): properly populate tx config options and deprecate ProtoCodecMarshaler (backport #17946) (#17952)

This commit is contained in:
mergify[bot]
2023-10-04 23:49:07 +02:00
committed by GitHub
parent 31e603ac8d
commit 3da9f9c9ec
10 changed files with 31 additions and 23 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import (
)
// DefaultTxDecoder returns a default protobuf TxDecoder using the provided Marshaler.
func DefaultTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder {
func DefaultTxDecoder(cdc codec.Codec) sdk.TxDecoder {
return func(txBytes []byte) (sdk.Tx, error) {
// Make sure txBytes follow ADR-027.
err := rejectNonADR027TxRaw(txBytes)
@@ -79,7 +79,7 @@ func DefaultTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder {
}
// DefaultJSONTxDecoder returns a default protobuf JSON TxDecoder using the provided Marshaler.
func DefaultJSONTxDecoder(cdc codec.ProtoCodecMarshaler) sdk.TxDecoder {
func DefaultJSONTxDecoder(cdc codec.Codec) sdk.TxDecoder {
return func(txBytes []byte) (sdk.Tx, error) {
var theTx tx.Tx
err := cdc.UnmarshalJSON(txBytes, &theTx)