diff --git a/src/@utils/subgraph.ts b/src/@utils/subgraph.ts index 7f6778113..8556bb964 100644 --- a/src/@utils/subgraph.ts +++ b/src/@utils/subgraph.ts @@ -71,6 +71,7 @@ const HighestLiquidityAssets = gql` symbol } baseTokenLiquidity + datatokenLiquidity } } ` @@ -294,6 +295,7 @@ export async function getHighestLiquidityDatatokens( highestLiquidityAssets.sort( (a, b) => b.baseTokenLiquidity - a.baseTokenLiquidity ) + for (let i = 0; i < highestLiquidityAssets.length; i++) { if (!highestLiquidityAssets[i]?.datatoken?.address) continue dtList.push(highestLiquidityAssets[i].datatoken.address) diff --git a/src/components/Home/index.tsx b/src/components/Home/index.tsx index c2632f348..6341a29af 100644 --- a/src/components/Home/index.tsx +++ b/src/components/Home/index.tsx @@ -24,10 +24,9 @@ async function getQueryHighest( esPaginationOptions: { size: dtList.length > 0 ? dtList.length : 1 }, - filters: [getFilterTerm('dataToken', dtList)] + filters: [getFilterTerm('services.datatokenAddress', dtList)] } as BaseQueryParams const queryHighest = generateBaseQuery(baseQueryParams) - return [queryHighest, dtList] } diff --git a/src/components/Profile/Header/Stats.tsx b/src/components/Profile/Header/Stats.tsx index ca4e83374..43e30d0ad 100644 --- a/src/components/Profile/Header/Stats.tsx +++ b/src/components/Profile/Header/Stats.tsx @@ -17,7 +17,6 @@ async function getPoolSharesLiquidity( poolShares: PoolShare[] ): Promise { let totalLiquidity = 0 - for (const poolShare of poolShares) { const poolLiquidity = calculateUserLiquidity(poolShare) totalLiquidity += poolLiquidity