Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aljo242 committed May 17, 2024
1 parent 000605a commit d2a3fab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x/feemarket/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (dfd FeeMarketCheckDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula

if len(feeCoins) != 1 {
if len(feeCoins) == 0 {
return ctx, errorsmod.Wrapf(feemarkettypes.ErrTest, "got length %d", len(feeCoins))
return ctx, errorsmod.Wrapf(feemarkettypes.ErrNoFeeCoins, "got length %d", len(feeCoins))
}
return ctx, errorsmod.Wrapf(feemarkettypes.ErrTooManyFeeCoins, "got length %d", len(feeCoins))
}
Expand Down Expand Up @@ -84,7 +84,7 @@ func (dfd FeeMarketCheckDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
func CheckTxFee(ctx sdk.Context, minFeesDecCoin sdk.DecCoin, feeTx sdk.FeeTx, isCheck bool, resolver feemarkettypes.DenomResolver) (payCoin sdk.Coin, tip sdk.Coin, err error) {
if len(feeTx.GetFee()) != 1 {
if len(feeTx.GetFee()) == 0 {
return sdk.Coin{}, sdk.Coin{}, errorsmod.Wrapf(feemarkettypes.ErrTest, "got length %d", len(feeTx.GetFee()))
return sdk.Coin{}, sdk.Coin{}, errorsmod.Wrapf(feemarkettypes.ErrNoFeeCoins, "got length %d", len(feeTx.GetFee()))
}
return sdk.Coin{}, sdk.Coin{}, errorsmod.Wrapf(feemarkettypes.ErrTooManyFeeCoins, "got length %d", len(feeTx.GetFee()))
}
Expand Down
1 change: 0 additions & 1 deletion x/feemarket/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ import (
var (
ErrNoFeeCoins = sdkerrors.New(ModuleName, 1, "no fee coin provided. Must provide one.")
ErrTooManyFeeCoins = sdkerrors.New(ModuleName, 2, "too many fee coins provided. Only one fee coin may be provided")
ErrTest = sdkerrors.New(ModuleName, 4, "TEST")
ErrResolverNotSet = sdkerrors.New(ModuleName, 3, "denom resolver interface not set")
)

0 comments on commit d2a3fab

Please sign in to comment.