Skip to content

Commit

Permalink
chore: add isUnbalancedLiquidityDisabled helper
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis committed Oct 3, 2024
1 parent 8b7c00c commit 530676c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/modules/pool/pool.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ export function requiresPermit2Approval(pool: Pool): boolean {
return isV3Pool(pool)
}

export function isUnbalancedLiquidityDisabled(pool: Pool): boolean {
// 0x8fc07bcf9b88ace84c7523248dc4a85f638c9536 --> pool with that
return !!pool.liquidityManagement?.disableUnbalancedLiquidity
}

export function getRateProviderWarnings(warnings: string[]) {
return warnings.filter(warning => !isEmpty(warning))
}
Expand Down
4 changes: 4 additions & 0 deletions lib/shared/services/api/pool.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ query GetPool($id: String!, $chain: GqlChain!, $userAddress: String) {
chain
protocolVersion
tags
liquidityManagement {
disableUnbalancedLiquidity
}
dynamicData {
poolId
swapEnabled
Expand Down Expand Up @@ -106,6 +109,7 @@ query GetPool($id: String!, $chain: GqlChain!, $userAddress: String) {
stakingId
}
}

... on GqlPoolWeighted {
nestingType
poolTokens {
Expand Down

0 comments on commit 530676c

Please sign in to comment.