diff --git a/client/tx/legacy.go b/client/tx/legacy.go index 62cbf9b7b43..b551ecebb81 100644 --- a/client/tx/legacy.go +++ b/client/tx/legacy.go @@ -61,6 +61,7 @@ func CopyTx(tx signing.Tx, builder client.TxBuilder, ignoreSignatureError bool) builder.SetMemo(tx.GetMemo()) builder.SetFeeAmount(tx.GetFee()) builder.SetGasLimit(tx.GetGas()) + builder.SetTimeoutHeight(tx.GetTimeoutHeight()) return nil } diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go index 59a7b95d7fb..b10c51e3440 100644 --- a/client/tx/legacy_test.go +++ b/client/tx/legacy_test.go @@ -21,8 +21,9 @@ import ( ) const ( - memo = "waboom" - gas = uint64(10000) + memo = "waboom" + gas = uint64(10000) + timeoutHeight = 5 ) var ( @@ -47,6 +48,7 @@ func buildTestTx(t *testing.T, builder client.TxBuilder) { require.NoError(t, err) err = builder.SetSignatures(sig) require.NoError(t, err) + builder.SetTimeoutHeight(timeoutHeight) } type TestSuite struct { @@ -105,6 +107,7 @@ func (s *TestSuite) TestConvertTxToStdTx() { s.Require().Equal(gas, stdTx.Fee.Gas) s.Require().Equal(fee, stdTx.Fee.Amount) s.Require().Equal(msg, stdTx.Msgs[0]) + s.Require().Equal(timeoutHeight, stdTx.TimeoutHeight) s.Require().Equal(sig.PubKey, stdTx.Signatures[0].PubKey) s.Require().Equal(sig.Data.(*signing2.SingleSignatureData).Signature, stdTx.Signatures[0].Signature) @@ -123,6 +126,7 @@ func (s *TestSuite) TestConvertTxToStdTx() { s.Require().Equal(gas, stdTx.Fee.Gas) s.Require().Equal(fee, stdTx.Fee.Amount) s.Require().Equal(msg, stdTx.Msgs[0]) + s.Require().Equal(timeoutHeight, stdTx.TimeoutHeight) s.Require().Empty(stdTx.Signatures) // std tx