diff --git a/modules/pool/lib/pool-gql-loader.service.ts b/modules/pool/lib/pool-gql-loader.service.ts index 302785ba7..b381545ee 100644 --- a/modules/pool/lib/pool-gql-loader.service.ts +++ b/modules/pool/lib/pool-gql-loader.service.ts @@ -1001,38 +1001,36 @@ export class PoolGqlLoaderService { __typename: 'GqlPoolPhantomStableNested', ...pool, nestingType: this.getPoolNestingType(pool), - tokens: pool.tokens - .filter((token) => token.address !== pool.address) - .map((token) => { - const nestedPool = token.nestedPool; + tokens: pool.tokens.map((token) => { + const nestedPool = token.nestedPool; - if (nestedPool && nestedPool.type === 'LINEAR') { - const totalShares = parseFloat(nestedPool.dynamicData?.totalShares || '0'); - const percentOfLinearSupplyNested = - totalShares > 0 ? parseFloat(token.dynamicData?.balance || '0') / totalShares : 0; + if (nestedPool && nestedPool.type === 'LINEAR') { + const totalShares = parseFloat(nestedPool.dynamicData?.totalShares || '0'); + const percentOfLinearSupplyNested = + totalShares > 0 ? parseFloat(token.dynamicData?.balance || '0') / totalShares : 0; - return { - ...this.mapPoolTokenToGql({ - ...token, - dynamicData: token.dynamicData - ? { - ...token.dynamicData, - balance: `${parseFloat(token.dynamicData.balance) * percentOfSupplyNested}`, - } - : null, - }), - __typename: 'GqlPoolTokenLinear', - ...this.getLinearPoolTokenData(token, nestedPool), - pool: this.mapNestedPoolToGqlPoolLinearNested( - nestedPool, - percentOfSupplyNested * percentOfLinearSupplyNested, - ), - totalBalance: token.dynamicData?.balance || '0', - }; - } + return { + ...this.mapPoolTokenToGql({ + ...token, + dynamicData: token.dynamicData + ? { + ...token.dynamicData, + balance: `${parseFloat(token.dynamicData.balance) * percentOfSupplyNested}`, + } + : null, + }), + __typename: 'GqlPoolTokenLinear', + ...this.getLinearPoolTokenData(token, nestedPool), + pool: this.mapNestedPoolToGqlPoolLinearNested( + nestedPool, + percentOfSupplyNested * percentOfLinearSupplyNested, + ), + totalBalance: token.dynamicData?.balance || '0', + }; + } - return this.mapPoolTokenToGql(token); - }), + return this.mapPoolTokenToGql(token); + }), totalLiquidity: `${pool.dynamicData?.totalLiquidity || 0}`, totalShares: pool.dynamicData?.totalShares || '0', swapFee: pool.dynamicData?.swapFee || '0',