diff --git a/src/domain/market/scope.ts b/src/domain/market/scope.ts index 7cd2413c..8932992a 100644 --- a/src/domain/market/scope.ts +++ b/src/domain/market/scope.ts @@ -2,8 +2,10 @@ export type ExchangeScope = "all" | "perp" | "spot" | "builders-perp"; export const EXCHANGE_SCOPES: ExchangeScope[] = ["all", "perp", "spot", "builders-perp"]; +const isTestnet = typeof import.meta !== "undefined" && import.meta.env?.VITE_HYPERLIQUID_TESTNET === "true"; + export const DEFAULT_SELECTED_MARKETS: Record = { - all: "VOLX-USDH", + all: isTestnet ? "VOLX-USDH" : "CL-USDC", perp: "BTC", spot: "@107", // ETH/USDC "builders-perp": "xyz:SILVER", diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 5fd4334a..c4c304a5 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,6 +1,7 @@ import { createFileRoute } from "@tanstack/react-router"; import { useEffect } from "react"; import { TradeTerminalPage } from "@/components/trade/trade-terminal-page"; +import { DEFAULT_SELECTED_MARKETS } from "@/domain/market"; import { buildPageHead } from "@/lib/seo"; import { useMarketActions } from "@/stores/use-market-store"; @@ -21,7 +22,7 @@ function IndexPage() { const { setSelectedMarket } = useMarketActions(); useEffect(() => { - setSelectedMarket("all", "VOLX-USDH"); + setSelectedMarket("all", DEFAULT_SELECTED_MARKETS.all); }, [setSelectedMarket]); return ;