We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c82c978 commit 99cea8bCopy full SHA for 99cea8b
apps/playground-web/src/hooks/useTokensData.ts
@@ -4,8 +4,10 @@ import { useQuery } from "@tanstack/react-query";
4
import type { TokenMetadata } from "@/lib/types";
5
6
async function fetchTokensFromApi(chainId?: number) {
7
- const domain = process.env.NEXT_PUBLIC_BRIDGE_URL;
8
- const url = new URL(`https://${domain}/v1/tokens`);
+ const domain = process.env.NEXT_PUBLIC_BRIDGE_URL || "bridge.thirdweb.com";
+ const url = new URL(
9
+ `${domain.includes("localhost") ? "http" : "https"}://${domain}/v1/tokens`,
10
+ );
11
12
if (chainId) {
13
url.searchParams.append("chainId", String(chainId));
0 commit comments