Skip to content

Commit

Permalink
Disable using staking rewards for fees
Browse files Browse the repository at this point in the history
  • Loading branch information
rkollar committed Dec 4, 2024
1 parent ed1d64f commit fd1b8fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/ante/cosmos/fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ func (dfd DeductFeeDecorator) deductFee(ctx sdk.Context, sdkTx sdk.Tx, fees sdk.
func deductFeesFromBalanceOrUnclaimedStakingRewards(
ctx sdk.Context, dfd DeductFeeDecorator, deductFeesFromAcc authtypes.AccountI, fees sdk.Coins,
) error {
if err := anteutils.ClaimStakingRewardsIfNecessary(
/*if err := anteutils.ClaimStakingRewardsIfNecessary(
ctx, dfd.bankKeeper, dfd.distributionKeeper, dfd.stakingKeeper, deductFeesFromAcc.GetAddress(), fees,
); err != nil {
return err
}
}*/

return authante.DeductFees(dfd.bankKeeper, ctx, deductFeesFromAcc, fees)
}
Expand Down
4 changes: 2 additions & 2 deletions app/ante/evm/09_gas_consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func deductFees(
}

// If the account balance is not sufficient, try to withdraw enough staking rewards
if err := anteutils.ClaimStakingRewardsIfNecessary(
/*if err := anteutils.ClaimStakingRewardsIfNecessary(
ctx,
keepers.Bank,
keepers.Distribution,
Expand All @@ -89,7 +89,7 @@ func deductFees(
fees,
); err != nil {
return err
}
}*/

if err := keepers.Evm.DeductTxCostsFromUserBalance(
ctx,
Expand Down

0 comments on commit fd1b8fc

Please sign in to comment.