diff --git a/src/hooks/usePoolLists.ts b/src/hooks/usePoolLists.ts index 787bcc8..f715db5 100644 --- a/src/hooks/usePoolLists.ts +++ b/src/hooks/usePoolLists.ts @@ -154,7 +154,7 @@ export const usePoolsList = ({ const poolsList = queryType === 'User' ? (dataPoolsList as UserPoolsListQuery).userPoolsList : (dataPoolsList as AllPoolsListQuery).allPoolsList; - return poolsList.map((pool) => ({ + const mappedPools = poolsList.map((pool) => ({ address: pool.id, token1: { image: !pool.iconUrl1 ? getIconUrl(pool.token1) : pool.iconUrl1, @@ -171,6 +171,10 @@ export const usePoolsList = ({ volumeChange24h: calculateVolumeChange(pool, tokenPrices), myLiquidity: calculateUserLiquidity(pool, tokenPrices), })); + + return queryType === 'User' + ? mappedPools.filter(pool => pool.myLiquidity && new BigNumber(pool.myLiquidity).isGreaterThan(0.1)) + : mappedPools; }, [dataPoolsList]); let count = 0; @@ -180,9 +184,10 @@ export const usePoolsList = ({ ? (dataPoolsCount as UserPoolsListCountQuery).userPoolsListCount : (dataPoolsCount as AllPoolsListCountQuery).allPoolsListCount; } + return [ processed, loadingPoolsList || loadingPoolsCount, count, ]; -}; +}; \ No newline at end of file