diff --git a/apps/connect/src/main.tsx b/apps/connect/src/main.tsx index c735afa22..3c89545ed 100644 --- a/apps/connect/src/main.tsx +++ b/apps/connect/src/main.tsx @@ -6,7 +6,7 @@ import theme from "./theme/portal.ts"; import Background from "./components/atoms/Background.tsx"; import App from "./App.tsx"; -if (redirects) { +if (redirects && redirects?.source?.length > 0) { const matcher = new RegExp(redirects.source.join("|")); if (matcher.test(window.location.hash)) { window.location.href = `${redirects.target}${window.location.hash}`; diff --git a/apps/connect/vite.config.ts b/apps/connect/vite.config.ts index 2960f5721..062fc842d 100644 --- a/apps/connect/vite.config.ts +++ b/apps/connect/vite.config.ts @@ -18,6 +18,7 @@ const MAINNET_RPCS = { export default defineConfig({ base: process.env.PUBLIC_URL || '', define: { + redirects: {}, wormholeConnectConfig: { env: process.env.VITE_APP_CLUSTER || 'mainnet', ...(process.env.VITE_APP_CLUSTER === 'mainnet' ? MAINNET_RPCS : {}),