@@ -19,15 +19,10 @@ import { Loader2Icon, LockIcon } from "lucide-react";
1919import { useState } from "react" ;
2020import { useForm } from "react-hook-form" ;
2121import { toast } from "sonner" ;
22- import {
23- arbitrumSepolia ,
24- baseSepolia ,
25- optimismSepolia ,
26- sepolia ,
27- } from "thirdweb/chains" ;
2822import * as z from "zod" ;
2923import { CopyTextButton } from "../../../../../../../../@/components/ui/CopyTextButton" ;
3024import { useTrack } from "../../../../../../../../hooks/analytics/useTrack" ;
25+ import { useAllChainsData } from "../../../../../../../../hooks/chains/allChains" ;
3126import type { Wallet } from "../server-wallets/wallet-table/types" ;
3227import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client" ;
3328import { deleteUserAccessToken , getUserAccessToken } from "./utils" ;
@@ -53,6 +48,7 @@ export function SendTestTransaction(props: {
5348 const [ hasSentTx , setHasSentTx ] = useState ( false ) ;
5449 const router = useDashboardRouter ( ) ;
5550 const trackEvent = useTrack ( ) ;
51+ const chainsQuery = useAllChainsData ( ) ;
5652
5753 const userAccessToken =
5854 props . userAccessToken ?? getUserAccessToken ( props . project . id ) ?? "" ;
@@ -227,33 +223,9 @@ export function SendTestTransaction(props: {
227223 < p className = "text-sm" > Network</ p >
228224 < SingleNetworkSelector
229225 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 ) }
257229 client = { thirdwebClient }
258230 chainId = { form . watch ( "chainId" ) }
259231 onChange = { ( chainId ) => {
0 commit comments