Skip to content

Commit 4c2530e

Browse files
committed
Merge branch 'main' into greg/fix-invalid-client-id-override
2 parents a1cd42f + 282d9f2 commit 4c2530e

File tree

2 files changed

+9
-8
lines changed
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/universal-bridge/webhooks/components
  • packages/thirdweb/src/utils

2 files changed

+9
-8
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/universal-bridge/webhooks/components/webhooks.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type PayWebhooksPageProps = {
6363

6464
export function PayWebhooksPage(props: PayWebhooksPageProps) {
6565
const webhooksQuery = useQuery({
66-
queryKey: ["webhooks", props.clientId],
66+
queryKey: ["webhooks", props.clientId, props.teamId],
6767
queryFn: async () => {
6868
return await getWebhooks({
6969
clientId: props.clientId,

packages/thirdweb/src/utils/fetch.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,15 @@ export function getClientFetch(client: ThirdwebClient, ecosystem?: Ecosystem) {
7070
if (client.teamId) {
7171
headers.set("x-team-id", client.teamId);
7272
}
73-
}
74-
75-
if (secretKey) {
76-
headers.set("x-secret-key", secretKey);
77-
}
73+
} else {
74+
// only set secret key or client id if we are NOT using the auth token!
75+
if (secretKey) {
76+
headers.set("x-secret-key", secretKey);
77+
}
7878

79-
if (clientId) {
80-
headers.set("x-client-id", clientId);
79+
if (clientId) {
80+
headers.set("x-client-id", clientId);
81+
}
8182
}
8283

8384
if (ecosystem) {

0 commit comments

Comments
 (0)