Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamu committed Sep 28, 2023
1 parent cb25f94 commit 0b4cb2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/subspaces/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ func (dfd DeductFeeDecorator) tryHandleSubspaceTx(ctx sdk.Context, tx sdk.FeeTx,
deductFeesFrom := tx.FeePayer()
feeGranter := tx.FeeGranter()

// If the fee granter is not equal to fee payer, or it's not equal to the subspace treasury,
// If the fee granter is not set, or it's not equal to the subspace treasury,
// then use auth.DeductFeeDecorator to deal with fees
if !bytes.Equal(deductFeesFrom, feeGranter) || !bytes.Equal(feeGranter, types.GetTreasuryAddress(subspaceID)) {
if !bytes.Equal(feeGranter, types.GetTreasuryAddress(subspaceID)) {
return ctx, false, nil
}

Expand All @@ -128,6 +128,7 @@ func (dfd DeductFeeDecorator) tryHandleSubspaceTx(ctx sdk.Context, tx sdk.FeeTx,
return ctx, false, nil
}

deductFeesFrom = feeGranter
deductFeesFromAcc := dfd.ak.GetAccount(ctx, deductFeesFrom)
if deductFeesFromAcc == nil {
return ctx, false, errors.Wrapf(sdkerrors.ErrUnknownAddress, "fee payer address: %s does not exist", deductFeesFrom)
Expand Down

0 comments on commit 0b4cb2e

Please sign in to comment.