diff --git a/codec/amino_codec_test.go b/codec/amino_codec_test.go index 56daf97fb5..c2f09710ae 100644 --- a/codec/amino_codec_test.go +++ b/codec/amino_codec_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) @@ -129,4 +130,12 @@ func TestAminoCodecFullDecodeAndEncode(t *testing.T) { marshaledTx, err := legacyCdc.MarshalJSON(tx) require.NoError(t, err) require.Equal(t, string(marshaledTx), txSigned) + + // Marshalling/unmarshalling the tx wrapped in a struct should work. + txRequest := &cli.BroadcastReq{ + Mode: "block", + Tx: tx, + } + _, err = legacyCdc.MarshalJSON(txRequest) + require.NoError(t, err) }