@@ -19,9 +19,9 @@ import {
19
19
import { AssetType , CurrencyAsset } from 'uniswap/src/entities/assets'
20
20
import { toSupportedChainId } from 'uniswap/src/features/chains/utils'
21
21
import { usePortfolioBalances , useTokenBalancesGroupedByVisibility } from 'uniswap/src/features/dataApi/balances'
22
- import { ALL_GQL_CHAINS } from 'uniswap/src/features/dataApi/searchTokens'
23
22
import { FeatureFlags } from 'uniswap/src/features/gating/flags'
24
23
import { useFeatureFlag } from 'uniswap/src/features/gating/hooks'
24
+ import { useEnabledChains } from 'uniswap/src/features/settings/hooks'
25
25
import { ModalName } from 'uniswap/src/features/telemetry/constants'
26
26
import { UniverseChainId } from 'uniswap/src/types/chains'
27
27
import { CurrencyField } from 'uniswap/src/types/currency'
@@ -137,6 +137,7 @@ function _OpenAIContextProvider({ children }: { children: React.ReactNode }): JS
137
137
} )
138
138
139
139
const activeAddress = useActiveAccountAddress ( ) || undefined
140
+ const { gqlChains } = useEnabledChains ( )
140
141
141
142
const signerAccount = useSignerAccounts ( ) [ 0 ]
142
143
// We sync backup state across all accounts under the same mnemonic, so can check status with any account.
@@ -210,7 +211,7 @@ function _OpenAIContextProvider({ children }: { children: React.ReactNode }): JS
210
211
const { text, chain } = args
211
212
const { data } = await apollo . query ( {
212
213
query : SearchTokensDocument ,
213
- variables : { searchQuery : text , chains : chain ? [ chain ] : ALL_GQL_CHAINS } ,
214
+ variables : { searchQuery : text , chains : chain ? [ chain ] : gqlChains } ,
214
215
} )
215
216
return { data }
216
217
} ,
@@ -311,6 +312,7 @@ function _OpenAIContextProvider({ children }: { children: React.ReactNode }): JS
311
312
shownTokens ,
312
313
signerAccount ?. address ,
313
314
swapSwarning ,
315
+ gqlChains ,
314
316
] )
315
317
316
318
const processMessages = useCallback ( async ( ) => {
0 commit comments