diff --git a/x/classictax/ante/ante.go b/x/classictax/ante/ante.go index 8a84deaaa..4ca4f1b1c 100644 --- a/x/classictax/ante/ante.go +++ b/x/classictax/ante/ante.go @@ -53,7 +53,7 @@ func (fd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, nex var paidFeeCoins sdk.Coins gasConsumed := ctx.GasMeter().GasConsumed() - if !simulate && ctx.BlockHeight() > 1 { + if !simulate && ctx.BlockHeight() > 0 { // check if we have at least enough fees sent to pay for the gas consumed up to this point if err = fd.checkTxFee(ctx, tx, stabilityTaxes); err != nil { return ctx, err diff --git a/x/classictax/classictax_test.go b/x/classictax/classictax_test.go index bcff13fa3..29aff4239 100644 --- a/x/classictax/classictax_test.go +++ b/x/classictax/classictax_test.go @@ -414,7 +414,7 @@ func (suite *AnteTestSuite) TestAnte_TaxPaymentDenoms() { feeAfterUSD = suite.app.BankKeeper.GetBalance(suite.ctx, fcModule.GetAddress(), core.MicroUSDDenom) suite.Require().Equal(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(16_995_000)), burnAfter) - suite.Require().Greater(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(200_000_000)), feeAfter) + suite.Require().Less(sdk.NewInt(200_000_000).Int64(), feeAfter.Amount.Int64()) suite.Require().Equal(sdk.NewCoin(core.MicroUSDDenom, sdk.NewInt(450_000)), burnAfterUSD) suite.Require().Equal(sdk.NewCoin(core.MicroUSDDenom, sdk.NewInt(750_000)), feeAfterUSD) } @@ -473,9 +473,6 @@ func (suite *AnteTestSuite) TestAnte_OverpayTax() { balance := suite.app.BankKeeper.GetAllBalances(suite.ctx, acc.GetAddress()) suite.Require().Less(sdk.NewInt(885_000_000).Int64(), balance.AmountOf(core.MicroLunaDenom).Int64()) suite.Require().Greater(sdk.NewInt(950_000_000).Int64(), balance.AmountOf(core.MicroLunaDenom).Int64()) - - value := suite.ctx.Value(classictaxtypes.CtxFeeKey) - suite.Require().Less(sdk.NewInt(5_000_000).Int64(), value.(sdk.Coins).AmountOf(core.MicroLunaDenom).Int64()) } func (suite *AnteTestSuite) TestAnte_RefundTax() {