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 7b58e5cCopy full SHA for 7b58e5c
apps/playground-web/src/hooks/useTokensData.ts
@@ -4,8 +4,8 @@ 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(`${domain.includes("localhost") ? "http" : "https"}://${domain}/v1/tokens`);
9
10
if (chainId) {
11
url.searchParams.append("chainId", String(chainId));
0 commit comments