From ca87570c7d4c502d1f17dc95d41176fef27b55a7 Mon Sep 17 00:00:00 2001 From: chefmomota Date: Thu, 17 Oct 2024 18:03:41 +0800 Subject: [PATCH] feat: Add log --- apps/web/src/state/farmsV4/state/extendPools/fetcher.ts | 7 ++++--- apps/web/src/state/farmsV4/state/extendPools/hooks.ts | 4 ---- apps/web/src/state/farmsV4/state/utils.ts | 1 + 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/web/src/state/farmsV4/state/extendPools/fetcher.ts b/apps/web/src/state/farmsV4/state/extendPools/fetcher.ts index fe77f8ab6a566..e1599bc05b4d0 100644 --- a/apps/web/src/state/farmsV4/state/extendPools/fetcher.ts +++ b/apps/web/src/state/farmsV4/state/extendPools/fetcher.ts @@ -81,9 +81,10 @@ export const fetchExplorerPoolInfo = async ( // @ts-ignore resp.data.chainId = chainId const farmConfig = await fetchAllUniversalFarms() - const isFarming = farmConfig.some((farm) => farm.lpAddress === poolAddress) - console.log('gg0', farmConfig) - console.log('gg1', isFarming) + const isFarming = farmConfig.some((farm) => farm.lpAddress.toLowerCase() === poolAddress.toLowerCase()) + console.log('resp', resp) + console.log('farmConfig', farmConfig) + console.log('isFarming', isFarming) const data = await composeFarmConfig(parseFarmPools([resp.data], { isFarming })[0]) console.log('ggg', data) diff --git a/apps/web/src/state/farmsV4/state/extendPools/hooks.ts b/apps/web/src/state/farmsV4/state/extendPools/hooks.ts index 91ee86a1dbd9d..929b42b6825c2 100644 --- a/apps/web/src/state/farmsV4/state/extendPools/hooks.ts +++ b/apps/web/src/state/farmsV4/state/extendPools/hooks.ts @@ -98,18 +98,14 @@ export const usePoolInfo = ({ poolAddress: string | null chainId: number }): TPoolType | undefined | null => { - console.log('hi', poolAddress, chainId) const { data: poolInfo } = useQuery({ queryKey: ['poolInfo', chainId, poolAddress], queryFn: async () => { const result = await fetchExplorerPoolInfo(poolAddress ?? '', chainId) - console.log('h2', result) return result }, enabled: !!poolAddress && !!chainId, }) - console.log('usePoolInfo', poolInfo) - return poolInfo as TPoolType | undefined | null } diff --git a/apps/web/src/state/farmsV4/state/utils.ts b/apps/web/src/state/farmsV4/state/utils.ts index 94d66297e156c..108527764f5a9 100644 --- a/apps/web/src/state/farmsV4/state/utils.ts +++ b/apps/web/src/state/farmsV4/state/utils.ts @@ -16,6 +16,7 @@ export const parseFarmPools = async ( options: { isFarming?: boolean } = {}, ): Promise => { const fetchFarmConfig = await fetchAllUniversalFarms() + console.log('sss', fetchFarmConfig) return data.map((pool) => { let stableSwapAddress: Address | undefined