Skip to content

Commit fd9768b

Browse files
committed
Merge remote-tracking branch 'origin/main' into ph/selfServeCancel
2 parents dd9a87d + 44b2634 commit fd9768b

File tree

142 files changed

+9419
-5291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+9419
-5291
lines changed

.changeset/metal-pets-play.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
"thirdweb": patch
4+
---
5+
6+
update dependencies

.changeset/sweet-pears-change.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix upload logic for delayed reveal batch

apps/dashboard/package.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,45 +30,45 @@
3030
"@emotion/styled": "11.13.0",
3131
"@hookform/resolvers": "^3.9.0",
3232
"@n8tb1t/use-scroll-position": "^2.0.3",
33-
"@radix-ui/react-alert-dialog": "^1.1.1",
34-
"@radix-ui/react-avatar": "^1.1.0",
35-
"@radix-ui/react-checkbox": "^1.1.1",
36-
"@radix-ui/react-dialog": "1.1.1",
37-
"@radix-ui/react-dropdown-menu": "^2.1.1",
38-
"@radix-ui/react-hover-card": "^1.1.1",
33+
"@radix-ui/react-alert-dialog": "^1.1.2",
34+
"@radix-ui/react-avatar": "^1.1.1",
35+
"@radix-ui/react-checkbox": "^1.1.2",
36+
"@radix-ui/react-dialog": "1.1.2",
37+
"@radix-ui/react-dropdown-menu": "^2.1.2",
38+
"@radix-ui/react-hover-card": "^1.1.2",
3939
"@radix-ui/react-label": "^2.1.0",
40-
"@radix-ui/react-popover": "^1.1.1",
40+
"@radix-ui/react-popover": "^1.1.2",
4141
"@radix-ui/react-progress": "^1.1.0",
42-
"@radix-ui/react-radio-group": "^1.2.0",
43-
"@radix-ui/react-select": "^2.1.1",
42+
"@radix-ui/react-radio-group": "^1.2.1",
43+
"@radix-ui/react-select": "^2.1.2",
4444
"@radix-ui/react-separator": "^1.1.0",
4545
"@radix-ui/react-slot": "^1.1.0",
46-
"@radix-ui/react-switch": "^1.1.0",
47-
"@radix-ui/react-tooltip": "1.1.2",
48-
"@sentry/nextjs": "8.32.0",
49-
"@shazow/whatsabi": "^0.15.2",
50-
"@stripe/react-stripe-js": "^2.7.3",
46+
"@radix-ui/react-switch": "^1.1.1",
47+
"@radix-ui/react-tooltip": "1.1.3",
48+
"@sentry/nextjs": "8.34.0",
49+
"@shazow/whatsabi": "^0.15.3",
50+
"@stripe/react-stripe-js": "^2.8.1",
5151
"@stripe/stripe-js": "^3.5.0",
52-
"@tanstack/react-query": "5.56.2",
52+
"@tanstack/react-query": "5.59.13",
5353
"@tanstack/react-table": "^8.17.3",
5454
"@thirdweb-dev/service-utils": "workspace:*",
5555
"@vercel/og": "^0.6.2",
56-
"abitype": "1.0.5",
56+
"abitype": "1.0.6",
5757
"chakra-react-select": "^4.7.6",
5858
"class-variance-authority": "^0.7.0",
5959
"clsx": "^2.1.1",
6060
"color": "^4.2.3",
6161
"compare-versions": "^6.1.0",
62-
"date-fns": "^3.6.0",
62+
"date-fns": "4.1.0",
6363
"flat": "^6.0.1",
64-
"framer-motion": "11.9.0",
64+
"framer-motion": "11.11.8",
6565
"fuse.js": "7.0.0",
6666
"input-otp": "^1.2.4",
6767
"ioredis": "^5.4.1",
6868
"ipaddr.js": "^2.2.0",
6969
"lottie-react": "^2.4.0",
70-
"lucide-react": "0.441.0",
71-
"next": "14.2.13",
70+
"lucide-react": "0.452.0",
71+
"next": "14.2.15",
7272
"next-plausible": "^3.12.0",
7373
"next-seo": "^6.5.0",
7474
"next-themes": "^0.3.0",
@@ -83,48 +83,48 @@
8383
"react-children-utilities": "^2.10.0",
8484
"react-day-picker": "^8.10.1",
8585
"react-dom": "18.3.1",
86-
"react-dropzone": "^14.2.3",
86+
"react-dropzone": "^14.2.9",
8787
"react-hook-form": "7.52.0",
8888
"react-icons": "^5.2.1",
8989
"react-intersection-observer": "^9.10.3",
9090
"react-markdown": "^9.0.1",
9191
"react-responsive-carousel": "^3.2.23",
9292
"react-table": "^7.8.0",
93-
"recharts": "^2.12.7",
93+
"recharts": "^2.13.0",
9494
"remark-gfm": "^4.0.0",
9595
"server-only": "^0.0.1",
9696
"sonner": "^1.5.0",
9797
"spdx-correct": "^3.2.0",
9898
"swagger-ui-react": "^5.17.14",
99-
"tailwind-merge": "^2.5.2",
99+
"tailwind-merge": "^2.5.4",
100100
"tailwindcss-animate": "^1.0.7",
101101
"thirdweb": "workspace:*",
102102
"tiny-invariant": "^1.3.3",
103-
"use-debounce": "^10.0.1",
103+
"use-debounce": "^10.0.4",
104104
"zod": "3.23.8"
105105
},
106106
"devDependencies": {
107107
"@chakra-ui/cli": "^2.4.1",
108108
"@chromatic-com/storybook": "2.0.2",
109-
"@next/bundle-analyzer": "14.2.13",
110-
"@next/eslint-plugin-next": "14.2.13",
109+
"@next/bundle-analyzer": "14.2.15",
110+
"@next/eslint-plugin-next": "14.2.15",
111111
"@playwright/test": "1.47.2",
112-
"@storybook/addon-essentials": "8.3.4",
112+
"@storybook/addon-essentials": "8.3.5",
113113
"@storybook/addon-interactions": "8.3.5",
114-
"@storybook/addon-links": "8.3.4",
115-
"@storybook/addon-onboarding": "8.3.4",
116-
"@storybook/addon-viewport": "8.3.4",
117-
"@storybook/blocks": "8.3.4",
118-
"@storybook/nextjs": "8.3.4",
119-
"@storybook/react": "8.3.4",
114+
"@storybook/addon-links": "8.3.5",
115+
"@storybook/addon-onboarding": "8.3.5",
116+
"@storybook/addon-viewport": "8.3.5",
117+
"@storybook/blocks": "8.3.5",
118+
"@storybook/nextjs": "8.3.5",
119+
"@storybook/react": "8.3.5",
120120
"@storybook/test": "8.3.5",
121121
"@types/color": "^3.0.6",
122122
"@types/node": "20.14.9",
123123
"@types/papaparse": "^5.3.14",
124124
"@types/pluralize": "^0.0.33",
125125
"@types/qrcode": "^1.5.5",
126-
"@types/react": "^18.3.10",
127-
"@types/react-dom": "^18",
126+
"@types/react": "^18.3.11",
127+
"@types/react-dom": "^18.3.1",
128128
"@types/react-table": "^7.7.20",
129129
"@types/spdx-correct": "^3.1.3",
130130
"@types/swagger-ui-react": "^4.18.3",
@@ -133,14 +133,14 @@
133133
"autoprefixer": "^10.4.19",
134134
"checkly": "^4.8.1",
135135
"eslint": "8.57.0",
136-
"eslint-config-biome": "1.8.4",
137-
"eslint-plugin-react-compiler": "0.0.0-experimental-ca16900-20240916",
136+
"eslint-config-biome": "1.9.3",
137+
"eslint-plugin-react-compiler": "0.0.0-experimental-fa06e2c-20241014",
138138
"eslint-plugin-storybook": "^0.9.0",
139-
"knip": "^5.30.6",
139+
"knip": "^5.33.3",
140140
"next-sitemap": "^4.2.3",
141141
"postcss": "8.4.47",
142-
"storybook": "8.3.4",
142+
"storybook": "8.3.5",
143143
"tailwindcss": "3.4.13",
144-
"typescript": "5.6.2"
144+
"typescript": "5.6.3"
145145
}
146146
}

apps/dashboard/src/@/components/ui/tabs.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,6 @@ function useUnderline<El extends HTMLElement>() {
159159
setTimeout(() => {
160160
lineEl.style.transition = "transform 0.3s, width 0.3s";
161161
}, 0);
162-
163-
activeTabEl.scrollIntoView({
164-
behavior: "smooth",
165-
block: "nearest",
166-
inline: "center",
167-
});
168162
} else if (lineRef.current) {
169163
lineRef.current.style.width = "0px";
170164
}

apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
44
import type { ResultItem } from "components/engine/system-metrics/components/StatusCodes";
55
import { THIRDWEB_API_HOST } from "constants/urls";
6+
import type { EngineBackendWalletType } from "lib/engine";
67
import { useState } from "react";
78
import { useActiveAccount, useActiveWalletChain } from "thirdweb/react";
89
import invariant from "tiny-invariant";
@@ -111,10 +112,16 @@ export function useEngineBackendWallets(instance: string) {
111112
});
112113
}
113114

115+
type EngineFeature =
116+
| "KEYPAIR_AUTH"
117+
| "CONTRACT_SUBSCRIPTIONS"
118+
| "IP_ALLOWLIST"
119+
| "HETEROGENEOUS_WALLET_TYPES";
120+
114121
interface EngineSystemHealth {
115122
status: string;
116123
engineVersion?: string;
117-
features?: string[];
124+
features?: EngineFeature[];
118125
}
119126

120127
export function useEngineSystemHealth(
@@ -138,6 +145,18 @@ export function useEngineSystemHealth(
138145
});
139146
}
140147

148+
// Helper function to check if a feature is supported.
149+
export function useHasEngineFeature(
150+
instanceUrl: string,
151+
feature: EngineFeature,
152+
) {
153+
const query = useEngineSystemHealth(instanceUrl);
154+
return {
155+
query,
156+
isSupported: !!query.data?.features?.includes(feature),
157+
};
158+
}
159+
141160
interface EngineSystemQueueMetrics {
142161
result: {
143162
queued: number;
@@ -188,17 +207,15 @@ export function useEngineLatestVersion() {
188207
}
189208

190209
interface UpdateVersionInput {
191-
engineId: string;
210+
deploymentId: string;
192211
serverVersion: string;
193212
}
194213

195214
export function useEngineUpdateServerVersion() {
196215
return useMutation({
197216
mutationFn: async (input: UpdateVersionInput) => {
198-
invariant(input.engineId, "engineId is required");
199-
200217
const res = await fetch(
201-
`${THIRDWEB_API_HOST}/v2/engine/${input.engineId}/infrastructure`,
218+
`${THIRDWEB_API_HOST}/v2/engine/deployments/${input.deploymentId}/infrastructure`,
202219
{
203220
method: "PUT",
204221
headers: {
@@ -400,29 +417,22 @@ export function useEngineTransactions(instance: string, autoUpdate: boolean) {
400417
});
401418
}
402419

403-
type WalletConfig =
404-
| {
405-
type: "local";
406-
}
407-
| {
408-
type: "aws-kms";
409-
awsAccessKeyId: string;
410-
awsSecretAccessKey: string;
411-
awsRegion: string;
412-
}
413-
| {
414-
type: "gcp-kms";
415-
gcpApplicationProjectId: string;
416-
gcpKmsLocationId: string;
417-
gcpKmsKeyRingId: string;
418-
gcpApplicationCredentialEmail: string;
419-
gcpApplicationCredentialPrivateKey: string;
420-
};
420+
export interface WalletConfigResponse {
421+
type: EngineBackendWalletType;
422+
423+
awsAccessKeyId?: string | null;
424+
awsRegion?: string | null;
425+
426+
gcpApplicationProjectId?: string | null;
427+
gcpKmsLocationId?: string | null;
428+
gcpKmsKeyRingId?: string | null;
429+
gcpApplicationCredentialEmail?: string | null;
430+
}
421431

422432
export function useEngineWalletConfig(instance: string) {
423433
const token = useLoggedInUser().user?.jwt ?? null;
424434

425-
return useQuery({
435+
return useQuery<WalletConfigResponse>({
426436
queryKey: engineKeys.walletConfig(instance),
427437
queryFn: async () => {
428438
const res = await fetch(`${instance}configuration/wallets`, {
@@ -431,8 +441,7 @@ export function useEngineWalletConfig(instance: string) {
431441
});
432442

433443
const json = await res.json();
434-
435-
return (json.result as WalletConfig) || {};
444+
return json.result;
436445
},
437446
enabled: !!instance && !!token,
438447
});
@@ -798,9 +807,6 @@ export function useEngineWebhooks(instance: string) {
798807

799808
// POST REQUESTS
800809
export type SetWalletConfigInput =
801-
| {
802-
type: "local";
803-
}
804810
| {
805811
type: "aws-kms";
806812
awsAccessKeyId: string;
@@ -820,8 +826,8 @@ export function useEngineSetWalletConfig(instance: string) {
820826
const token = useLoggedInUser().user?.jwt ?? null;
821827
const queryClient = useQueryClient();
822828

823-
return useMutation({
824-
mutationFn: async (input: SetWalletConfigInput) => {
829+
return useMutation<WalletConfigResponse, void, SetWalletConfigInput>({
830+
mutationFn: async (input) => {
825831
invariant(instance, "instance is required");
826832

827833
const res = await fetch(`${instance}configuration/wallets`, {
@@ -846,6 +852,7 @@ export function useEngineSetWalletConfig(instance: string) {
846852
}
847853

848854
export type CreateBackendWalletInput = {
855+
type: EngineBackendWalletType;
849856
label?: string;
850857
};
851858

@@ -912,25 +919,20 @@ export function useEngineUpdateBackendWallet(instance: string) {
912919
});
913920
}
914921

915-
export type ImportBackendWalletInput =
916-
| {
917-
awsKmsKeyId: string;
918-
awsKmsArn: string;
919-
}
920-
| {
921-
gcpKmsKeyId: string;
922-
gcpKmsKeyVersionId: string;
923-
}
924-
| {
925-
privateKey?: string;
926-
}
927-
| {
928-
mnemonic?: string;
929-
}
930-
| {
931-
encryptedJson?: string;
932-
password?: string;
933-
};
922+
// The backend determines the wallet imported based on the provided fields.
923+
export type ImportBackendWalletInput = {
924+
label?: string;
925+
926+
awsKmsArn?: string;
927+
928+
gcpKmsKeyId?: string;
929+
gcpKmsKeyVersionId?: string;
930+
931+
privateKey?: string;
932+
mnemonic?: string;
933+
encryptedJson?: string;
934+
password?: string;
935+
};
934936

935937
export function useEngineImportBackendWallet(instance: string) {
936938
const token = useLoggedInUser().user?.jwt ?? null;
@@ -1638,6 +1640,9 @@ export function useEngineCreateNotificationChannel(engineId: string) {
16381640
`${THIRDWEB_API_HOST}/v1/engine/${engineId}/notification-channels`,
16391641
{
16401642
method: "POST",
1643+
headers: {
1644+
"Content-Type": "application/json",
1645+
},
16411646
body: JSON.stringify(input),
16421647
},
16431648
);
@@ -1666,7 +1671,9 @@ export function useEngineDeleteNotificationChannel(engineId: string) {
16661671

16671672
const res = await fetch(
16681673
`${THIRDWEB_API_HOST}/v1/engine/${engineId}/notification-channels/${notificationChannelId}`,
1669-
{ method: "DELETE" },
1674+
{
1675+
method: "DELETE",
1676+
},
16701677
);
16711678
if (!res.ok) {
16721679
throw new Error(`Unexpected status ${res.status}: ${await res.text()}`);

0 commit comments

Comments
 (0)