Skip to content

Commit

Permalink
chore: add logic for empty pool tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis committed Dec 18, 2024
1 parent 9538a64 commit 5255329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/modules/pool/pool.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { GetTokenFn } from '../tokens/TokensProvider'
import { vaultV3Abi } from '@balancer/sdk'
import { TokenCore, PoolListItem, ApiToken } from './pool.types'
import { Pool } from './PoolProvider'
import { HumanTokenAmountWithAddress } from '../tokens/token.types'

/**
* METHODS
Expand Down Expand Up @@ -203,6 +202,7 @@ export function getPoolHelpers(pool: Pool, chain: GqlChain) {
}

export function hasNestedPools(pool: Pool) {
if (!pool.poolTokens) return false
// The following discriminator is needed because not all pools in GqlPoolQuery do have nestingType property
// and the real TS discriminator is __typename which we don't want to use
return (
Expand Down

0 comments on commit 5255329

Please sign in to comment.