Skip to content

Commit c67d562

Browse files
committed
Merge branch 'main' into ian/ftux
2 parents faa5864 + 9fadbcc commit c67d562

File tree

74 files changed

+5355
-8311
lines changed

Some content is hidden

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

74 files changed

+5355
-8311
lines changed

.changeset/hip-tips-dress.md

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

apps/dashboard/framer-rewrites.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// add framer paths here
2+
module.exports = [
3+
"/",
4+
"/connect/sign-in",
5+
"/contracts/modular-contracts",
6+
"/unlimited-wallets",
7+
];

apps/dashboard/next-sitemap.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// @ts-check
2+
23
/**
34
*
45
*/
@@ -77,8 +78,16 @@ module.exports = {
7778
};
7879
},
7980
additionalPaths: async (config) => {
81+
// eslint-disable-next-line @typescript-eslint/no-var-requires
82+
const FRAMER_PATHS = require("./framer-rewrites");
8083
const allChains = await fetchChainsFromApi();
8184
return [
85+
...FRAMER_PATHS.map((path) => ({
86+
loc: path,
87+
changefreq: config.changefreq,
88+
priority: config.priority,
89+
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
90+
})),
8291
...allChains.map((chain) => {
8392
return {
8493
loc: `/${chain.slug}`,

apps/dashboard/next.config.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ContentSecurityPolicy = `
66
media-src * data: blob:;
77
object-src 'none';
88
style-src 'self' 'unsafe-inline' vercel.live;
9-
font-src 'self' vercel.live assets.vercel.com framerusercontent.com;
9+
font-src 'self' vercel.live assets.vercel.com framerusercontent.com fonts.gstatic.com;
1010
frame-src * data:;
1111
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com framerusercontent.com events.framer.com challenges.cloudflare.com;
1212
connect-src * data: blob:;
@@ -38,13 +38,7 @@ const securityHeaders = [
3838
];
3939

4040
const redirects = require("./redirects");
41-
42-
// add framer paths here
43-
const FRAMER_PATHS = [
44-
"/connect/sign-in",
45-
"/contracts/modular-contracts",
46-
"/unlimited-wallets",
47-
];
41+
const FRAMER_PATHS = require("./framer-rewrites");
4842

4943
/**
5044
* @returns {import('next').RemotePattern[]}
@@ -135,6 +129,11 @@ const moduleExports = {
135129
source: "/thirdweb.eth/:path*",
136130
destination: "/deployer.thirdweb.eth/:path*",
137131
},
132+
// re-write /home to / (this is so that logged in users will be able to go to /home and NOT be redirected to the logged in app)
133+
{
134+
source: "/home",
135+
destination: "/",
136+
},
138137
...FRAMER_PATHS.map((path) => ({
139138
source: path,
140139
destination: `https://landing.thirdweb.com${path}`,
@@ -191,7 +190,7 @@ module.exports = withBundleAnalyzer(
191190
// An auth token is required for uploading source maps.
192191
authToken: process.env.SENTRY_AUTH_TOKEN,
193192
// Suppresses source map uploading logs during build
194-
silent: false,
193+
silent: true,
195194
// For all available options, see:
196195
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
197196

apps/dashboard/package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
"@radix-ui/react-slot": "^1.1.0",
4747
"@radix-ui/react-switch": "^1.1.1",
4848
"@radix-ui/react-tooltip": "1.1.3",
49-
"@sentry/nextjs": "8.34.0",
49+
"@sentry/nextjs": "8.35.0",
5050
"@shazow/whatsabi": "^0.15.4",
5151
"@stripe/react-stripe-js": "^2.8.1",
5252
"@stripe/stripe-js": "^3.5.0",
53-
"@tanstack/react-query": "5.59.13",
53+
"@tanstack/react-query": "5.59.16",
5454
"@tanstack/react-table": "^8.17.3",
5555
"@thirdweb-dev/service-utils": "workspace:*",
5656
"@vercel/og": "^0.6.2",
@@ -68,7 +68,7 @@
6868
"ioredis": "^5.4.1",
6969
"ipaddr.js": "^2.2.0",
7070
"lottie-react": "^2.4.0",
71-
"lucide-react": "0.452.0",
71+
"lucide-react": "0.453.0",
7272
"next": "14.2.15",
7373
"next-plausible": "^3.12.0",
7474
"next-seo": "^6.5.0",
@@ -87,7 +87,6 @@
8787
"react-dropzone": "^14.2.9",
8888
"react-error-boundary": "^4.1.2",
8989
"react-hook-form": "7.52.0",
90-
"react-intersection-observer": "^9.10.3",
9190
"react-markdown": "^9.0.1",
9291
"react-responsive-carousel": "^3.2.23",
9392
"react-table": "^7.8.0",
@@ -110,14 +109,14 @@
110109
"@next/bundle-analyzer": "14.2.15",
111110
"@next/eslint-plugin-next": "14.2.15",
112111
"@playwright/test": "1.47.2",
113-
"@storybook/addon-essentials": "8.3.5",
114-
"@storybook/addon-interactions": "8.3.5",
115-
"@storybook/addon-links": "8.3.5",
116-
"@storybook/addon-onboarding": "8.3.5",
117-
"@storybook/addon-viewport": "8.3.5",
118-
"@storybook/blocks": "8.3.5",
119-
"@storybook/nextjs": "8.3.5",
120-
"@storybook/react": "8.3.5",
112+
"@storybook/addon-essentials": "8.3.6",
113+
"@storybook/addon-interactions": "8.3.6",
114+
"@storybook/addon-links": "8.3.6",
115+
"@storybook/addon-onboarding": "8.3.6",
116+
"@storybook/addon-viewport": "8.3.6",
117+
"@storybook/blocks": "8.3.6",
118+
"@storybook/nextjs": "8.3.6",
119+
"@storybook/react": "8.3.6",
121120
"@storybook/test": "8.3.6",
122121
"@types/color": "^3.0.6",
123122
"@types/node": "20.14.9",
@@ -140,8 +139,8 @@
140139
"knip": "^5.33.3",
141140
"next-sitemap": "^4.2.3",
142141
"postcss": "8.4.47",
143-
"storybook": "8.3.5",
144-
"tailwindcss": "3.4.13",
142+
"storybook": "8.3.6",
143+
"tailwindcss": "3.4.14",
145144
"typescript": "5.6.3"
146145
}
147146
}

apps/dashboard/src/@/components/ui/radio-group.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ const RadioGroupItemButton = React.forwardRef<
5151
<RadioGroupPrimitive.Item
5252
ref={ref}
5353
className={cn(
54-
"group flex min-w-32 cursor-pointer items-center space-x-3 space-y-0 rounded-md border-2 px-3 py-4 font-medium transition-all hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 peer-hover:border-nonce data-[state=checked]:border-inverted",
54+
"group flex min-w-32 cursor-pointer items-center space-x-3 space-y-0 rounded-lg border px-4 py-3 font-medium transition-all hover:border-foreground/25 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 peer-hover:border-nonce data-[state=checked]:border-muted-foreground",
5555
className,
5656
)}
5757
{...props}
5858
>
59-
<div className="flex aspect-square h-4 w-4 items-center justify-center rounded-full border-2 text-inverted ring-offset-background transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-foreground/25 group-data-[state=checked]:border-inverted">
59+
<div className="flex aspect-square h-4 w-4 items-center justify-center rounded-full border text-inverted ring-offset-background transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-foreground/25 group-data-[state=checked]:border-inverted">
6060
{/* Show on checked */}
6161
<RadioGroupPrimitive.Indicator className="flex items-center justify-center rounded-full transition-all">
6262
<Circle className="h-2 w-2 fill-current text-current" />

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export function useUserOpUsageAggregate(args: {
435435
const { clientId, from, to } = args;
436436
const { user, isLoggedIn } = useLoggedInUser();
437437

438-
return useQuery({
438+
return useQuery<UserOpStats>({
439439
queryKey: accountKeys.userOpStats(
440440
user?.address as string,
441441
clientId as string,
@@ -444,12 +444,28 @@ export function useUserOpUsageAggregate(args: {
444444
"all",
445445
),
446446
queryFn: async () => {
447-
return getUserOpUsage({
447+
const userOpStats: UserOpStats[] = await getUserOpUsage({
448448
clientId,
449449
from,
450450
to,
451451
period: "all",
452452
});
453+
454+
// Aggregate stats across wallet types
455+
return userOpStats.reduce(
456+
(acc, curr) => {
457+
acc.successful += curr.successful;
458+
acc.failed += curr.failed;
459+
acc.sponsoredUsd += curr.sponsoredUsd;
460+
return acc;
461+
},
462+
{
463+
date: (from || new Date()).toISOString(),
464+
successful: 0,
465+
failed: 0,
466+
sponsoredUsd: 0,
467+
},
468+
);
453469
},
454470
enabled: !!clientId && !!user?.address && isLoggedIn,
455471
});

apps/dashboard/src/app/(dashboard)/dashboard/connect/account-abstraction/[clientId]/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default async function Page(props: {
4444
);
4545

4646
return (
47-
<div className="flex flex-col gap-10">
47+
<div className="flex flex-col gap-6">
4848
<div className="flex flex-col content-start justify-between gap-4 lg:flex-row">
4949
<PageHeader />
5050

@@ -68,7 +68,9 @@ export default async function Page(props: {
6868
<SmartWallets
6969
apiKeyServices={apiKey.services || []}
7070
trackingCategory="smart-wallet"
71-
defaultTab={props.searchParams.tab === "1" ? 1 : 0}
71+
tab={props.searchParams.tab}
72+
smartWalletsLayoutSlug={`/dashboard/connect/account-abstraction/${clientId}`}
73+
clientId={apiKey.key}
7274
/>
7375

7476
<ConnectSDKCard

apps/dashboard/src/app/(dashboard)/dashboard/connect/analytics/[clientId]/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export default async function Page(props: {
5151

5252
<div className="h-4 lg:h-8" />
5353

54-
<ConnectAnalyticsDashboard clientId={apiKey.key} />
54+
<ConnectAnalyticsDashboard
55+
clientId={apiKey.key}
56+
connectLayoutSlug="/dashboard/connect"
57+
/>
5558

5659
<div className="h-4 lg:h-8" />
5760
<ConnectSDKCard description="Add the Connect SDK to your app to start collecting analytics." />

apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/EcosystemPermissionsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function EcosystemPermissionsPage({
1010
const { ecosystem } = useEcosystem({ slug: params.slug });
1111

1212
return (
13-
<div className="flex flex-col gap-12">
13+
<div className="flex flex-col gap-8">
1414
<IntegrationPermissionsSection ecosystem={ecosystem} />
1515
<AuthOptionsSection ecosystem={ecosystem} />
1616
{ecosystem?.permission === "PARTNER_WHITELIST" && (

0 commit comments

Comments
 (0)