Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit d450134

Browse files
authored
chore: add isUnbalancedLiquidityDisabled helper (#1147)
* chore: add isUnbalancedLiquidityDisabled helper
1 parent a0bd180 commit d450134

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/modules/pool/pool.helpers.ts

+4
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ export function requiresPermit2Approval(pool: Pool): boolean {
326326
return isV3Pool(pool)
327327
}
328328

329+
export function isUnbalancedLiquidityDisabled(pool: Pool): boolean {
330+
return !!pool.liquidityManagement?.disableUnbalancedLiquidity
331+
}
332+
329333
export function getRateProviderWarnings(warnings: string[]) {
330334
return warnings.filter(warning => !isEmpty(warning))
331335
}

lib/shared/services/api/pool.graphql

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ query GetPool($id: String!, $chain: GqlChain!, $userAddress: String) {
1313
chain
1414
protocolVersion
1515
tags
16+
liquidityManagement {
17+
disableUnbalancedLiquidity
18+
}
1619
dynamicData {
1720
poolId
1821
swapEnabled
@@ -106,6 +109,7 @@ query GetPool($id: String!, $chain: GqlChain!, $userAddress: String) {
106109
stakingId
107110
}
108111
}
112+
109113
... on GqlPoolWeighted {
110114
nestingType
111115
poolTokens {

0 commit comments

Comments
 (0)