Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matt, Park <[email protected]>
  • Loading branch information
ValarDragon and mattverse authored Apr 22, 2022
1 parent 2c22499 commit f341152
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x/txfees/keeper/feedecorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo
return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx")
}

// checks to make sure the module account has been set to collect fees in OSMO
// checks to make sure the module account has been set to collect fees in base token
if addr := dfd.ak.GetModuleAddress(types.FeeCollectorName); addr == nil {
return ctx, fmt.Errorf("Fee collector module account (%s) has not been set", types.FeeCollectorName)
}

// checks to make sure a separate module account has been set to collect fees not in OSMO
// checks to make sure a separate module account has been set to collect fees not in base token
if addrNonNativeFee := dfd.ak.GetModuleAddress(types.NonNativeFeeCollectorName); addrNonNativeFee == nil {
return ctx, fmt.Errorf("non native fee collector module account (%s) has not been set", types.NonNativeFeeCollectorName)
}
Expand Down
2 changes: 1 addition & 1 deletion x/txfees/keeper/feedecorator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (suite *KeeperTestSuite) TestFeeDecorator() {
)
suite.ExecuteUpgradeFeeTokenProposal(uion, uionPoolId)

suite.Ctx = suite.Ctx.WithIsCheckTx(tc.isCheckTx)
suite.Ctx = suite.Ctx.WithIsCheckTx(tc.isCheckTx).WithMinGasPrices(tc.minGasPrices)
suite.Ctx = suite.Ctx.WithMinGasPrices(tc.minGasPrices)

// TxBuilder components reset for every test case
Expand Down

0 comments on commit f341152

Please sign in to comment.