From 2d03063a4482e7839602217517b7413a93f9cb19 Mon Sep 17 00:00:00 2001 From: vishnukumavat Date: Mon, 6 Nov 2023 19:20:44 +0530 Subject: [PATCH] reject swap fee distribution for disabled pools --- x/liquidity/keeper/pool.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/liquidity/keeper/pool.go b/x/liquidity/keeper/pool.go index 4a985efb2..df74a5393 100644 --- a/x/liquidity/keeper/pool.go +++ b/x/liquidity/keeper/pool.go @@ -685,6 +685,10 @@ func (k Keeper) TransferFundsForSwapFeeDistribution(ctx sdk.Context, appID, requ return sdk.Coin{}, types.ErrInvalidPoolID } + if requestedPool.Disabled { + return sdk.Coin{}, types.ErrDisabledPool + } + pair, found := k.GetPair(ctx, appID, requestedPool.PairId) if !found { return sdk.Coin{}, types.ErrInvalidPairID