diff --git a/x/feeabs/ante/decorate.go b/x/feeabs/ante/decorate.go index c8fe4552..d74b155e 100644 --- a/x/feeabs/ante/decorate.go +++ b/x/feeabs/ante/decorate.go @@ -253,6 +253,11 @@ func (famfd FeeAbstrationMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk hasHostChainConfig := famfd.feeabsKeeper.HasHostZoneConfig(ctx, feeDenom) if hasHostChainConfig { hostChainConfig, _ := famfd.feeabsKeeper.GetHostZoneConfig(ctx, feeDenom) + // check if hostzone if frozen + if hostChainConfig.Frozen { + return ctx, feeabstypes.ErrHostZoneFrozen + } + nativeCoinsFees, err := famfd.feeabsKeeper.CalculateNativeFromIBCCoins(ctx, feeCoins, hostChainConfig) if err != nil { return ctx, sdkerrors.Wrapf(errorstypes.ErrInsufficientFee, "insufficient fees") diff --git a/x/feeabs/types/epoch.go b/x/feeabs/types/epoch.go index 2c99f6cf..568c15df 100644 --- a/x/feeabs/types/epoch.go +++ b/x/feeabs/types/epoch.go @@ -6,8 +6,8 @@ import ( ) const ( - DefaultSwapPeriod time.Duration = time.Minute * 180 - DefaultQueryPeriod time.Duration = time.Minute * 60 + DefaultSwapPeriod time.Duration = time.Minute * 5 + DefaultQueryPeriod time.Duration = time.Minute * 5 DefaultSwapEpochIdentifier string = "swap" DefaultQueryEpochIdentifier string = "query" ) diff --git a/x/feeabs/types/errors.go b/x/feeabs/types/errors.go index d941329b..4532da62 100644 --- a/x/feeabs/types/errors.go +++ b/x/feeabs/types/errors.go @@ -9,5 +9,6 @@ var ( ErrInvalidIBCFees = sdkerrors.Register(ModuleName, 2, "invalid ibc fees") ErrHostZoneConfigNotFound = sdkerrors.Register(ModuleName, 3, "host chain config not found") ErrDuplicateHostZoneConfig = sdkerrors.Register(ModuleName, 4, "duplicate config") + ErrHostZoneFrozen = sdkerrors.Register(ModuleName, 5, "hostzone frozen") ErrNotEnoughFundInModuleAddress = sdkerrors.Register(ModuleName, 6, "not have funding yet") )