diff --git a/x/move/ante/fee_test.go b/x/move/ante/fee_test.go index 59d8d858..a0daf6b5 100644 --- a/x/move/ante/fee_test.go +++ b/x/move/ante/fee_test.go @@ -100,10 +100,6 @@ func (suite *AnteTestSuite) TestEnsureMempoolFees() { tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) - suite.txBuilder.SetFeeAmount(atomFeeAmount) - tx2, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) - suite.Require().NoError(err) - // Set high gas price so standard test fee fails // gas price = 0.004 basePrice := sdk.NewDecCoinFromDec(baseDenom, sdk.NewDecWithPrec(4, 3)) @@ -135,7 +131,9 @@ func (suite *AnteTestSuite) TestEnsureMempoolFees() { _, _, err = fc.CheckTxFeeWithMinGasPrices(suite.ctx, tx) suite.Require().Nil(err, "Decorator should not have errored on fee higher than local gasPrice") - _, _, err = fc.CheckTxFeeWithMinGasPrices(suite.ctx, tx2) + suite.txBuilder.SetFeeAmount(atomFeeAmount) + suite.Require().Equal(atomFeeAmount, tx.GetFee()) + _, _, err = fc.CheckTxFeeWithMinGasPrices(suite.ctx, tx) suite.Require().Nil(err, "Decorator should not have errored on fee higher than local gasPrice") // set high base_min_gas_price to test should be failed @@ -146,6 +144,8 @@ func (suite *AnteTestSuite) TestEnsureMempoolFees() { baseMinGasPrice: sdk.NewDecWithPrec(4, 3), }) + suite.txBuilder.SetFeeAmount(feeAmount) + suite.Require().Equal(feeAmount, tx.GetFee()) _, _, err = fc.CheckTxFeeWithMinGasPrices(suite.ctx, tx) suite.Require().NotNil(err, "Decorator should have errored on too low fee for local gasPrice") }