@@ -13,9 +13,8 @@ import { isAddress } from 'viem'
13
13
import { base } from 'viem/chains'
14
14
15
15
import { useQueryParams } from '@/app/earn/use-query-params'
16
- import { ETH , Token } from '@/constants/tokens'
17
- import { TokenBalance , useBalances } from '@/lib/hooks/use-balance'
18
- import { QuoteResult } from '@/lib/hooks/use-best-quote/types'
16
+ import { ETH , type Token } from '@/constants/tokens'
17
+ import { type TokenBalance , useBalances } from '@/lib/hooks/use-balance'
19
18
import { useNetwork } from '@/lib/hooks/use-network'
20
19
import { useQuoteResult } from '@/lib/hooks/use-quote-result'
21
20
import { useWallet } from '@/lib/hooks/use-wallet'
@@ -29,6 +28,8 @@ import { calculateApy } from '@/lib/utils/apy'
29
28
30
29
import { getCurrencyTokens , getYieldTokens } from './constants'
31
30
31
+ import type { QuoteResult } from '@/lib/hooks/use-best-quote/types'
32
+
32
33
const hyEthTokenlist = getTokenByChainAndSymbol ( 1 , 'hyETH' )
33
34
const hyETH = { ...hyEthTokenlist , image : hyEthTokenlist . logoURI }
34
35
const icETH = getTokenByChainAndSymbol ( 1 , 'icETH' )
@@ -176,6 +177,7 @@ export function EarnProvider(props: { children: any }) {
176
177
queryKey : [ 'token-latest-stats' , indexTokenAddress ] ,
177
178
queryFn : async ( ) => {
178
179
const data = await fetchTokenMetrics ( {
180
+ chainId : indexToken . chainId ! ,
179
181
tokenAddress : indexTokenAddress ! ,
180
182
metrics : [ 'nav' , 'apy' , 'pav' ] ,
181
183
} )
@@ -199,6 +201,7 @@ export function EarnProvider(props: { children: any }) {
199
201
queryKey : [ 'token-apy-stats' , indexTokenAddress ] ,
200
202
queryFn : async ( ) => {
201
203
const data = await fetchTokenHistoricalData ( {
204
+ chainId,
202
205
tokenAddress : indexTokenAddress ! ,
203
206
metrics : [ 'apy' ] ,
204
207
interval : 'daily' ,
0 commit comments