Skip to content

Commit

Permalink
reject swap fee distribution for disabled pools
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnukumavat committed Nov 6, 2023
1 parent 723cec2 commit 2d03063
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/liquidity/keeper/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d03063

Please sign in to comment.