@@ -19,15 +19,10 @@ import { Loader2Icon, LockIcon } from "lucide-react";
19
19
import { useState } from "react" ;
20
20
import { useForm } from "react-hook-form" ;
21
21
import { toast } from "sonner" ;
22
- import {
23
- arbitrumSepolia ,
24
- baseSepolia ,
25
- optimismSepolia ,
26
- sepolia ,
27
- } from "thirdweb/chains" ;
28
22
import * as z from "zod" ;
29
23
import { CopyTextButton } from "../../../../../../../../@/components/ui/CopyTextButton" ;
30
24
import { useTrack } from "../../../../../../../../hooks/analytics/useTrack" ;
25
+ import { useAllChainsData } from "../../../../../../../../hooks/chains/allChains" ;
31
26
import type { Wallet } from "../server-wallets/wallet-table/types" ;
32
27
import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client" ;
33
28
import { deleteUserAccessToken , getUserAccessToken } from "./utils" ;
@@ -53,6 +48,7 @@ export function SendTestTransaction(props: {
53
48
const [ hasSentTx , setHasSentTx ] = useState ( false ) ;
54
49
const router = useDashboardRouter ( ) ;
55
50
const trackEvent = useTrack ( ) ;
51
+ const chainsQuery = useAllChainsData ( ) ;
56
52
57
53
const userAccessToken =
58
54
props . userAccessToken ?? getUserAccessToken ( props . project . id ) ?? "" ;
@@ -227,33 +223,9 @@ export function SendTestTransaction(props: {
227
223
< p className = "text-sm" > Network</ p >
228
224
< SingleNetworkSelector
229
225
className = "bg-background"
230
- chainIds = { [
231
- baseSepolia . id ,
232
- optimismSepolia . id ,
233
- arbitrumSepolia . id ,
234
- sepolia . id ,
235
- 1301 ,
236
- 1946 ,
237
- 1993 ,
238
- 919 ,
239
- 6342 ,
240
- 10143 ,
241
- 44787 ,
242
- 80002 ,
243
- 80069 ,
244
- 98985 ,
245
- 128123 ,
246
- 167009 ,
247
- 168587773 ,
248
- 37714555429 ,
249
- 1952959480 ,
250
- 97 ,
251
- 296 ,
252
- 1740 ,
253
- 4202 ,
254
- 10200 ,
255
- 13337 ,
256
- ] }
226
+ chainIds = { chainsQuery . allChains
227
+ . filter ( ( chain ) => chain . testnet === true )
228
+ . map ( ( chain ) => chain . chainId ) }
257
229
client = { thirdwebClient }
258
230
chainId = { form . watch ( "chainId" ) }
259
231
onChange = { ( chainId ) => {
0 commit comments