File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/lib/hooks/use-best-quote Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { useCallback , useEffect , useMemo , useState } from 'react'
2
- import { usePublicClient } from 'wagmi'
3
2
4
3
import { ARBITRUM } from '@/constants/chains'
5
4
import { isAvailableForFlashMint } from '@/lib/hooks/use-best-quote/utils/available'
@@ -41,8 +40,7 @@ export const useBestQuote = (
41
40
inputToken : Token ,
42
41
outputToken : Token ,
43
42
) => {
44
- const publicClient = usePublicClient ( )
45
- const { address, provider, rpcUrl } = useWallet ( )
43
+ const { address, provider } = useWallet ( )
46
44
const { chainId : networkChainId } = useNetwork ( )
47
45
const { logEvent } = useAnalytics ( )
48
46
// Assume mainnet when no chain is connected (to be able to fetch quotes)
@@ -80,8 +78,10 @@ export const useBestQuote = (
80
78
return
81
79
}
82
80
83
- if ( ! provider || ! publicClient || ! chainId || ! address || ! rpcUrl ) {
84
- console . error ( 'Error fetching quotes - no provider or chain id present' )
81
+ if ( ! provider || ! chainId || ! address ) {
82
+ console . error (
83
+ 'Error fetching quotes - no provider | chain id | address present' ,
84
+ )
85
85
return
86
86
}
87
87
@@ -168,8 +168,6 @@ export const useBestQuote = (
168
168
outputToken ,
169
169
nativeTokenPrice ,
170
170
provider ,
171
- publicClient ,
172
- rpcUrl ,
173
171
] ,
174
172
)
175
173
You can’t perform that action at this time.
0 commit comments