Skip to content

Commit 7b58e5c

Browse files
committed
fix: localhost ub domains
1 parent c82c978 commit 7b58e5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/playground-web/src/hooks/useTokensData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { useQuery } from "@tanstack/react-query";
44
import type { TokenMetadata } from "@/lib/types";
55

66
async function fetchTokensFromApi(chainId?: number) {
7-
const domain = process.env.NEXT_PUBLIC_BRIDGE_URL;
8-
const url = new URL(`https://${domain}/v1/tokens`);
7+
const domain = process.env.NEXT_PUBLIC_BRIDGE_URL || "bridge.thirdweb.com";
8+
const url = new URL(`${domain.includes("localhost") ? "http" : "https"}://${domain}/v1/tokens`);
99

1010
if (chainId) {
1111
url.searchParams.append("chainId", String(chainId));

0 commit comments

Comments
 (0)