diff --git a/apps/dashboard/src/@/constants/thirdweb-client.client.ts b/apps/dashboard/src/@/constants/thirdweb-client.client.ts index 428684ca171..3b38795a0e8 100644 --- a/apps/dashboard/src/@/constants/thirdweb-client.client.ts +++ b/apps/dashboard/src/@/constants/thirdweb-client.client.ts @@ -3,9 +3,11 @@ import { getConfiguredThirdwebClient } from "./thirdweb.server"; export function getClientThirdwebClient(params?: { jwt: string | undefined | null; teamId: string | undefined | null; + projectClientId?: string; }) { return getConfiguredThirdwebClient({ secretKey: params?.jwt ?? undefined, teamId: params?.teamId ?? undefined, + projectClientId: params?.projectClientId, }); } diff --git a/apps/dashboard/src/@/constants/thirdweb.server.ts b/apps/dashboard/src/@/constants/thirdweb.server.ts index cd7aab19f8b..033bb7ed7dc 100644 --- a/apps/dashboard/src/@/constants/thirdweb.server.ts +++ b/apps/dashboard/src/@/constants/thirdweb.server.ts @@ -25,6 +25,7 @@ import { getVercelEnv } from "@/utils/vercel"; export function getConfiguredThirdwebClient(options: { secretKey: string | undefined; teamId: string | undefined; + projectClientId: string | undefined; }): ThirdwebClient { if (getVercelEnv() !== "production") { // if not on production: run this when creating a client to set the domains @@ -89,6 +90,7 @@ export function getConfiguredThirdwebClient(options: { }, secretKey: secretKey, teamId: options.teamId, + projectClientId: options.projectClientId, }); } diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx index 555eb0065c5..9328ff3d07f 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/page.tsx @@ -36,7 +36,8 @@ export default async function Page(props: { const client = getClientThirdwebClient({ jwt: authToken, teamId: team.id, - }); + projectClientId: project.publishableKey, + }); return (