Skip to content

Commit 9ca46f3

Browse files
authored
feat: Connect farm api (#10829)
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring the farm configurations and APIs to improve the handling of universal farms, including the removal of legacy configurations and the introduction of new fetching methods for better data management. ### Detailed summary - Deleted multiple test files and components related to `HotTokenList`. - Added `FARMS_API` endpoint for fetching farm data. - Refactored farm exports in `index.ts`. - Updated `useQuery` calls to use asynchronous functions for fetching pool info. - Replaced legacy farm configurations with universal farm configurations. - Introduced `fetchUniversalFarms` and `fetchAllUniversalFarms` functions to handle farm data retrieval. - Updated components to use the new farm API, including `useV3FarmAPI`. - Removed deprecated farm configurations and associated imports. - Enhanced error handling in fetching logic for better resilience. > The following files were skipped due to too many changes: `packages/farms/src/farms/zkSync.ts`, `packages/farms/src/farms/base.ts`, `packages/farms/src/farms/eth.ts`, `packages/farms/src/farms/arb.ts`, `packages/farms/src/farms/bsc.ts` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 63cec60 commit 9ca46f3

File tree

48 files changed

+330
-6238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+330
-6238
lines changed

apps/web/src/hooks/useFarm.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { ComputedFarmConfigV3, createFarmFetcherV3, fetchTokenUSDValues } from '@pancakeswap/farms'
1+
import { createFarmFetcherV3, fetchTokenUSDValues } from '@pancakeswap/farms'
22
import { priceHelperTokens } from '@pancakeswap/farms/constants/common'
3-
import { Currency, ERC20Token } from '@pancakeswap/sdk'
3+
import { ChainId, Currency, ERC20Token } from '@pancakeswap/sdk'
44
import { FeeAmount, Pool } from '@pancakeswap/v3-sdk'
55
import { useQuery } from '@tanstack/react-query'
6-
import { useMemo } from 'react'
7-
8-
import { legacyFarmsV3ConfigChainMap } from '@pancakeswap/farms/constants/v3'
96
import { FAST_INTERVAL } from 'config/constants'
7+
import { useV3FarmAPI } from 'hooks/useV3FarmAPI'
8+
import { useMemo } from 'react'
109
import { getViemClients } from 'utils/viem'
1110

1211
const farmFetcherV3 = createFarmFetcherV3(getViemClients)
@@ -19,18 +18,20 @@ interface FarmParams {
1918

2019
export function useFarm({ currencyA, currencyB, feeAmount }: FarmParams) {
2120
const chainId = currencyA?.chainId
21+
const { farms } = useV3FarmAPI(chainId as ChainId)
22+
2223
const farmConfig = useMemo(() => {
2324
if (!chainId || !currencyA || !currencyB || !feeAmount) {
2425
return null
2526
}
26-
const farms: ComputedFarmConfigV3[] = legacyFarmsV3ConfigChainMap[chainId]
27+
2728
if (!farms) {
2829
return null
2930
}
3031
const lpAddress = Pool.getAddress(currencyA.wrapped, currencyB.wrapped, feeAmount)
3132
const farm = farms.find((f) => f.lpAddress === lpAddress)
3233
return farm ?? null
33-
}, [chainId, currencyA, currencyB, feeAmount])
34+
}, [chainId, currencyA, currencyB, farms, feeAmount])
3435

3536
return useQuery({
3637
queryKey: [chainId, farmConfig?.token0.symbol, farmConfig?.token1.symbol, farmConfig?.feeAmount],

apps/web/src/hooks/useV3FarmAPI.ts

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { ChainId } from '@pancakeswap/chains'
2+
import {
3+
defineFarmV3ConfigsFromUniversalFarm,
4+
fetchUniversalFarms,
5+
Protocol,
6+
UniversalFarmConfigV3,
7+
} from '@pancakeswap/farms'
8+
import { useQuery } from '@tanstack/react-query'
9+
10+
export const useV3FarmAPI = (chainId: ChainId) => {
11+
const { data: farms } = useQuery({
12+
queryKey: ['fetch-v3-farm-api'],
13+
queryFn: async () => {
14+
if (chainId) {
15+
const farmsV3 = await fetchUniversalFarms(chainId, Protocol.V3)
16+
return defineFarmV3ConfigsFromUniversalFarm(farmsV3 as UniversalFarmConfigV3[])
17+
}
18+
return []
19+
},
20+
enabled: Boolean(chainId),
21+
refetchOnWindowFocus: false,
22+
refetchOnReconnect: false,
23+
refetchOnMount: false,
24+
})
25+
26+
return {
27+
farms: farms ?? [],
28+
}
29+
}

apps/web/src/pages/api/configs/farms/v2/[chain].ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import { ChainId, chainNameToChainId, chainNames } from '@pancakeswap/chains'
2-
import { UNIVERSAL_FARMS_WITH_TESTNET, formatUniversalFarmToSerializedFarm } from '@pancakeswap/farms'
1+
import { ChainId, chainNames, chainNameToChainId } from '@pancakeswap/chains'
2+
import {
3+
fetchAllUniversalFarms,
4+
formatUniversalFarmToSerializedFarm,
5+
UNIVERSAL_FARMS_WITH_TESTNET,
6+
} from '@pancakeswap/farms'
37
import { NextApiHandler } from 'next'
48
import { stringify } from 'viem'
59
import { enum as enum_, nativeEnum } from 'zod'
@@ -24,7 +28,8 @@ const handler: NextApiHandler = async (req, res) => {
2428
}
2529

2630
try {
27-
const farmConfig = UNIVERSAL_FARMS_WITH_TESTNET.filter((farm) => farm.chainId === chainId)
31+
const fetchFarmConfig = await fetchAllUniversalFarms()
32+
const farmConfig = [...fetchFarmConfig, ...UNIVERSAL_FARMS_WITH_TESTNET].filter((farm) => farm.chainId === chainId)
2833
const legacyFarmConfig = formatUniversalFarmToSerializedFarm(farmConfig)
2934
// cache for long time, it should revalidate on every deployment
3035
res.setHeader('Cache-Control', `max-age=10800, s-maxage=31536000`)

apps/web/src/pages/api/configs/farms/v2/index.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { UNIVERSAL_FARMS, UNIVERSAL_FARMS_WITH_TESTNET, formatUniversalFarmToSerializedFarm } from '@pancakeswap/farms'
1+
import {
2+
UNIVERSAL_FARMS_WITH_TESTNET,
3+
fetchAllUniversalFarms,
4+
formatUniversalFarmToSerializedFarm,
5+
} from '@pancakeswap/farms'
26
import { NextApiHandler } from 'next'
37
import { stringify } from 'viem'
48

59
const handler: NextApiHandler = async (req, res) => {
6-
const includeTestnet = !!req.query.includeTestnet
7-
810
try {
9-
const farmConfig = includeTestnet ? UNIVERSAL_FARMS_WITH_TESTNET : UNIVERSAL_FARMS
11+
const fetchFarmConfig = await fetchAllUniversalFarms()
12+
const includeTestnet = !!req.query.includeTestnet
13+
const farmConfig = includeTestnet ? [...fetchFarmConfig, ...UNIVERSAL_FARMS_WITH_TESTNET] : fetchFarmConfig
1014
const legacyFarmConfig = formatUniversalFarmToSerializedFarm(farmConfig)
1115
// cache for long time, it should revalidate on every deployment
1216
res.setHeader('Cache-Control', `max-age=10800, s-maxage=31536000`)

apps/web/src/pages/api/v3/[chainId]/farms/index.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { ChainId } from '@pancakeswap/chains'
2-
import { createFarmFetcherV3, fetchCommonTokenUSDValue } from '@pancakeswap/farms'
2+
import {
3+
createFarmFetcherV3,
4+
defineFarmV3ConfigsFromUniversalFarm,
5+
fetchCommonTokenUSDValue,
6+
fetchUniversalFarms,
7+
Protocol,
8+
UniversalFarmConfigV3,
9+
} from '@pancakeswap/farms'
310
import { priceHelperTokens } from '@pancakeswap/farms/constants/common'
4-
import { legacyFarmsV3ConfigChainMap } from '@pancakeswap/farms/constants/v3'
511
import { NextApiHandler } from 'next'
612
import { getViemClients } from 'utils/viem.server'
713
import { nativeEnum as zNativeEnum } from 'zod'
@@ -22,7 +28,9 @@ const handler: NextApiHandler = async (req, res) => {
2228
if (!farmFetcherV3.isChainSupported(chainId)) {
2329
return res.status(400).json({ error: 'Chain not supported' })
2430
}
25-
const farms = legacyFarmsV3ConfigChainMap[chainId]
31+
32+
const fetchFarmsV3 = await fetchUniversalFarms(chainId, Protocol.V3)
33+
const farms = defineFarmV3ConfigsFromUniversalFarm(fetchFarmsV3 as UniversalFarmConfigV3[])
2634

2735
const commonPrice = await fetchCommonTokenUSDValue(priceHelperTokens[chainId])
2836

apps/web/src/state/farmsV3/hooks.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import {
66
FarmsV3Response,
77
IPendingCakeByTokenId,
88
PositionDetails,
9+
Protocol,
910
SerializedFarmsV3Response,
11+
UniversalFarmConfigV3,
1012
bCakeSupportedChainId,
1113
createFarmFetcherV3,
14+
defineFarmV3ConfigsFromUniversalFarm,
15+
fetchUniversalFarms,
1216
supportedChainIdV3,
1317
} from '@pancakeswap/farms'
1418
import { priceHelperTokens } from '@pancakeswap/farms/constants/common'
15-
import { legacyFarmsV3ConfigChainMap } from '@pancakeswap/farms/constants/v3'
1619
import { bCakeFarmBoosterVeCakeABI } from '@pancakeswap/farms/constants/v3/abi/bCakeFarmBoosterVeCake'
1720
import { TvlMap, fetchCommonTokenUSDValue } from '@pancakeswap/farms/src/fetchFarmsV3'
1821
import { deserializeToken } from '@pancakeswap/token-lists'
@@ -83,8 +86,8 @@ export const useFarmsV3Public = () => {
8386
}
8487

8588
// direct copy from api routes, the client side fetch is preventing cache due to migration phase we want fresh data
86-
const farms = legacyFarmsV3ConfigChainMap[chainId as ChainId]
87-
89+
const fetchFarmsV3 = await fetchUniversalFarms(chainId, Protocol.V3)
90+
const farms = defineFarmV3ConfigsFromUniversalFarm(fetchFarmsV3 as UniversalFarmConfigV3[])
8891
const commonPrice = await fetchCommonTokenUSDValue(priceHelperTokens[chainId ?? -1])
8992

9093
try {

apps/web/src/state/farmsV4/state/accountPositions/fetcher.ts

+33-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { BCakeWrapperFarmConfig, Protocol, UNIVERSAL_FARMS, UNIVERSAL_FARMS_MAP } from '@pancakeswap/farms'
1+
import { BCakeWrapperFarmConfig, Protocol, fetchAllUniversalFarms, fetchAllUniversalFarmsMap } from '@pancakeswap/farms'
22
import { CurrencyAmount, ERC20Token, Pair, Token, pancakePairV2ABI } from '@pancakeswap/sdk'
33
import { LegacyStableSwapPair } from '@pancakeswap/smart-router/legacy-router'
44
import { deserializeToken } from '@pancakeswap/token-lists'
5+
import { getBalanceNumber } from '@pancakeswap/utils/formatBalance'
56
import BigNumber from 'bignumber.js'
67
import { infoStableSwapABI } from 'config/abi/infoStableSwap'
78
import { v2BCakeWrapperABI } from 'config/abi/v2BCakeWrapper'
@@ -12,7 +13,6 @@ import { AppState } from 'state'
1213
import { safeGetAddress } from 'utils'
1314
import { publicClient } from 'utils/viem'
1415
import { Address, erc20Abi, zeroAddress } from 'viem'
15-
import { getBalanceNumber } from '@pancakeswap/utils/formatBalance'
1616
import { StablePoolInfo, V2PoolInfo } from '../type'
1717
import { StableLPDetail, V2LPDetail } from './type'
1818

@@ -67,18 +67,20 @@ type ITokenPair = [ERC20Token, ERC20Token]
6767
// for v2 pools, we cannot fetch all positions from one contract
6868
// so we simple get the most used pairs for fetch LP position
6969
export const getTrackedV2LpTokens = memoize(
70-
(
70+
async (
7171
chainId: number,
7272
presetTokens: { [address: Address]: ERC20Token },
7373
userSavedPairs: AppState['user']['pairs'],
74-
): [ERC20Token, ERC20Token][] => {
74+
): Promise<[ERC20Token, ERC20Token][]> => {
7575
const pairTokens: ITokenPair[] = []
76+
const fetchFarmConfig = await fetchAllUniversalFarms()
77+
7678
// from farms
77-
UNIVERSAL_FARMS.filter(
78-
(farm) => farm.protocol === 'v2' && farm.bCakeWrapperAddress && farm.chainId === chainId,
79-
).forEach((farm) => {
80-
pairTokens.push(farm.token0.sortsBefore(farm.token1) ? [farm.token0, farm.token1] : [farm.token1, farm.token0])
81-
})
79+
fetchFarmConfig
80+
.filter((farm) => farm.protocol === 'v2' && farm.bCakeWrapperAddress && farm.chainId === chainId)
81+
.forEach((farm) => {
82+
pairTokens.push(farm.token0.sortsBefore(farm.token1) ? [farm.token0, farm.token1] : [farm.token1, farm.token0])
83+
})
8284
// from pinned pairs
8385
if (PINNED_PAIRS[chainId]) {
8486
PINNED_PAIRS[chainId].forEach((tokens: ITokenPair) => {
@@ -114,11 +116,10 @@ export const getTrackedV2LpTokens = memoize(
114116
`${chainId}:${Object.keys(presetTokens).length}:${Object.values(userSavedPairs).length}`,
115117
)
116118

117-
const V2_UNIVERSAL_FARMS = UNIVERSAL_FARMS.filter((farm) => farm.protocol === Protocol.V2)
118-
const STABLE_UNIVERSAL_FARMS = UNIVERSAL_FARMS.filter((farm) => farm.protocol === Protocol.STABLE)
119+
export const getBCakeWrapperAddress = async (lpAddress: Address, chainId: number) => {
120+
const fetchUniversalFarmsMap = await fetchAllUniversalFarmsMap()
119121

120-
export const getBCakeWrapperAddress = (lpAddress: Address, chainId: number) => {
121-
const f = UNIVERSAL_FARMS_MAP[`${chainId}:${lpAddress}`] as V2PoolInfo | StablePoolInfo | undefined
122+
const f = fetchUniversalFarmsMap[`${chainId}:${lpAddress}`] as V2PoolInfo | StablePoolInfo | undefined
122123

123124
return f?.bCakeWrapperAddress ?? '0x'
124125
}
@@ -137,7 +138,13 @@ export const getAccountV2LpDetails = async (
137138

138139
const validLpTokens = lpTokens.filter((token) => token.chainId === chainId)
139140

140-
const bCakeWrapperAddresses = validLpTokens.map((token) => getBCakeWrapperAddress(token.address, chainId))
141+
const bCakeWrapperAddresses = await Promise.all(
142+
validReserveTokens.map(async (tokens) => {
143+
const lpAddress = getV2LiquidityToken(tokens).address
144+
const bCakeWrapperAddress = await getBCakeWrapperAddress(lpAddress, chainId)
145+
return bCakeWrapperAddress
146+
}),
147+
)
141148

142149
const balanceCalls = validLpTokens.map((token) => {
143150
return {
@@ -207,6 +214,10 @@ export const getAccountV2LpDetails = async (
207214
}
208215
return acc
209216
}, [] as Array<readonly [bigint, bigint, bigint, bigint, bigint] | undefined>)
217+
218+
const farmConfig = await fetchAllUniversalFarms()
219+
const V2_UNIVERSAL_FARMS = farmConfig.filter((farm) => farm.protocol === Protocol.V2)
220+
210221
return balances
211222
.map((result, index) => {
212223
const { result: _balance = 0n, status } = result
@@ -275,10 +286,11 @@ export const getStablePairDetails = async (
275286

276287
if (!account || !client || !validStablePairs.length) return []
277288

278-
const bCakeWrapperAddresses = validStablePairs.reduce((acc, pair) => {
279-
acc.push(getBCakeWrapperAddress(pair.lpAddress, chainId))
280-
return acc
281-
}, [] as Array<Address>)
289+
const bCakeWrapperAddresses = await Promise.all(
290+
validStablePairs.reduce((acc, pair) => {
291+
return [...acc, getBCakeWrapperAddress(pair.lpAddress, chainId)]
292+
}, [] as Array<Promise<Address>>),
293+
)
282294

283295
const balanceCalls = validStablePairs.map((pair) => {
284296
return {
@@ -366,6 +378,8 @@ export const getStablePairDetails = async (
366378
.then((res) => res.map((item) => item.result ?? [0n, 0n])),
367379
])
368380

381+
const farmConfig = await fetchAllUniversalFarms()
382+
369383
const result = validStablePairs.map((pair, index) => {
370384
const nativeBalance = CurrencyAmount.fromRawAmount(pair.liquidityToken, balances[index])
371385
const farmingInfo = farming[index]
@@ -388,6 +402,7 @@ export const getStablePairDetails = async (
388402
const farmingDeposited0 = CurrencyAmount.fromRawAmount(token0.wrapped, farmingToken0Amount.toString())
389403
const farmingDeposited1 = CurrencyAmount.fromRawAmount(token1.wrapped, farmingToken1Amount.toString())
390404

405+
const STABLE_UNIVERSAL_FARMS = farmConfig.filter((farm) => farm.protocol === Protocol.STABLE)
391406
const isStaked = !!STABLE_UNIVERSAL_FARMS.find((farm) => farm.lpAddress === pair.lpAddress)
392407

393408
return {

apps/web/src/state/farmsV4/state/accountPositions/hooks/useAccountV2LpDetails.ts

+25-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ERC20Token } from '@pancakeswap/sdk'
22
import { useQueries, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'
33
import { SLOW_INTERVAL } from 'config/constants'
44
import { useOfficialsAndUserAddedTokensByChainIds } from 'hooks/Tokens'
5-
import { useCallback, useMemo } from 'react'
5+
import { useCallback, useEffect, useMemo, useState } from 'react'
66
import { useSelector } from 'react-redux'
77
import { AppState } from 'state'
88
import { Address } from 'viem'
@@ -13,18 +13,33 @@ import { useLatestTxReceipt } from './useLatestTxReceipt'
1313
export const useAccountV2LpDetails = (chainIds: number[], account?: Address | null) => {
1414
const tokens = useOfficialsAndUserAddedTokensByChainIds(chainIds)
1515
const userSavedPairs = useSelector<AppState, AppState['user']['pairs']>(({ user: { pairs } }) => pairs)
16-
const lpTokensByChain = useMemo(() => {
17-
const result: Record<number, [ERC20Token, ERC20Token][]> = {}
18-
chainIds.forEach((chainId) => {
19-
const lpTokens = getTrackedV2LpTokens(chainId, tokens[chainId], userSavedPairs)
20-
if (lpTokens && lpTokens.length > 0) {
21-
result[chainId] = lpTokens
22-
}
23-
})
24-
return result
16+
const [lpTokensByChain, setLpTokensByChain] = useState<Record<number, [ERC20Token, ERC20Token][]> | null>(null)
17+
18+
useEffect(() => {
19+
const fetchLpTokens = async () => {
20+
const result: Record<number, [ERC20Token, ERC20Token][]> = {}
21+
22+
await Promise.all(
23+
chainIds.map(async (chainId) => {
24+
const lpTokens = await getTrackedV2LpTokens(chainId, tokens[chainId], userSavedPairs)
25+
if (lpTokens && lpTokens.length > 0) {
26+
result[chainId] = lpTokens
27+
}
28+
}),
29+
)
30+
31+
setLpTokensByChain(result)
32+
}
33+
34+
fetchLpTokens()
2535
}, [chainIds, tokens, userSavedPairs])
36+
2637
const [latestTxReceipt] = useLatestTxReceipt()
2738
const queries = useMemo(() => {
39+
if (!lpTokensByChain) {
40+
return []
41+
}
42+
2843
return Object.entries(lpTokensByChain).map(([chainId, lpTokens]) => {
2944
return {
3045
queryKey: ['accountV2LpDetails', account, chainId, lpTokens.length, latestTxReceipt?.blockHash],

apps/web/src/state/farmsV4/state/extendPools/fetcher.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getChainNameInKebabCase } from '@pancakeswap/chains'
2-
import { UNIVERSAL_FARMS, UNIVERSAL_FARMS_MAP } from '@pancakeswap/farms'
2+
import { fetchAllUniversalFarms, fetchAllUniversalFarmsMap } from '@pancakeswap/farms'
33
import set from 'lodash/set'
44
import { chainIdToExplorerInfoChainName, explorerApiClient } from 'state/info/api/client'
55
import { PoolInfo, StablePoolInfo, V2PoolInfo } from '../type'
@@ -33,20 +33,22 @@ export const fetchExplorerPoolsList = async (query: Required<ExtendPoolsQuery>,
3333
}
3434

3535
const { rows, endCursor, startCursor, hasNextPage, hasPrevPage } = resp.data
36+
const pools = await parseFarmPools(rows)
3637

3738
return {
38-
pools: parseFarmPools(rows),
39+
pools,
3940
endCursor,
4041
startCursor,
4142
hasNextPage,
4243
hasPrevPage,
4344
}
4445
}
4546

46-
const composeFarmConfig = (farm: PoolInfo) => {
47+
const composeFarmConfig = async (farm: PoolInfo) => {
4748
if (farm.protocol !== 'stable' && farm.protocol !== 'v2') return farm
4849

49-
const localFarm = UNIVERSAL_FARMS_MAP[`${farm.chainId}:${farm.lpAddress}`] as V2PoolInfo | StablePoolInfo | undefined
50+
const farmConfig = await fetchAllUniversalFarmsMap()
51+
const localFarm = farmConfig[`${farm.chainId}:${farm.lpAddress}`] as V2PoolInfo | StablePoolInfo | undefined
5052

5153
if (!localFarm) {
5254
return farm
@@ -78,7 +80,10 @@ export const fetchExplorerPoolInfo = async <TPoolType extends PoolInfo>(
7880
}
7981
// @ts-ignore
8082
resp.data.chainId = chainId
81-
const isFarming = UNIVERSAL_FARMS.some((farm) => farm.lpAddress === poolAddress)
83+
const farmConfig = await fetchAllUniversalFarms()
84+
const isFarming = farmConfig.some((farm) => farm.lpAddress.toLowerCase() === poolAddress.toLowerCase())
85+
const farm = await parseFarmPools([resp.data], { isFarming })
86+
const data = await composeFarmConfig(farm[0])
8287

83-
return composeFarmConfig(parseFarmPools([resp.data], { isFarming })[0]) as TPoolType
88+
return data as TPoolType
8489
}

apps/web/src/state/farmsV4/state/extendPools/hooks.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ export const usePoolInfo = <TPoolType extends PoolInfo>({
100100
}): TPoolType | undefined | null => {
101101
const { data: poolInfo } = useQuery({
102102
queryKey: ['poolInfo', chainId, poolAddress],
103-
queryFn: () => fetchExplorerPoolInfo(poolAddress ?? '', chainId),
103+
queryFn: async () => {
104+
const result = await fetchExplorerPoolInfo(poolAddress ?? '', chainId)
105+
return result
106+
},
104107
enabled: !!poolAddress && !!chainId,
105108
})
106109

0 commit comments

Comments
 (0)