Skip to content

Commit 45bf727

Browse files
authored
Merge branch 'thirdweb-dev:main' into add-base-account-sdk
2 parents 46e2bff + 621f187 commit 45bf727

File tree

202 files changed

+8181
-1424
lines changed

Some content is hidden

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

202 files changed

+8181
-1424
lines changed

apps/dashboard/next.config.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,60 @@ const baseNextConfig: NextConfig = {
161161
],
162162
source: "/bridge/widget/:path*",
163163
},
164+
{
165+
headers: [
166+
{
167+
key: "Content-Security-Policy",
168+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
169+
},
170+
],
171+
source: "/bridge/checkout-widget",
172+
},
173+
{
174+
headers: [
175+
{
176+
key: "Content-Security-Policy",
177+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
178+
},
179+
],
180+
source: "/bridge/checkout-widget/:path*",
181+
},
182+
{
183+
headers: [
184+
{
185+
key: "Content-Security-Policy",
186+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
187+
},
188+
],
189+
source: "/bridge/swap-widget",
190+
},
191+
{
192+
headers: [
193+
{
194+
key: "Content-Security-Policy",
195+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
196+
},
197+
],
198+
source: "/bridge/swap-widget/:path*",
199+
},
200+
{
201+
headers: [
202+
{
203+
key: "Content-Security-Policy",
204+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
205+
},
206+
],
207+
source: "/bridge/buy-widget",
208+
},
209+
{
210+
headers: [
211+
{
212+
key: "Content-Security-Policy",
213+
value: EmbedContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
214+
},
215+
],
216+
source: "/bridge/buy-widget/:path*",
217+
},
164218
];
165219
},
166220
images: {
50.3 KB
Loading
42 KB
Loading
16.3 KB
Loading
17.1 KB
Loading

apps/dashboard/src/@/actions/billing.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ export async function getChainInfraCheckoutURL(options: {
109109
}
110110

111111
const json = await res.json();
112+
113+
if (
114+
"error" in json &&
115+
"message" in json.error &&
116+
typeof json.error.message === "string"
117+
) {
118+
return {
119+
error: json.error.message,
120+
status: "error",
121+
} as const;
122+
}
123+
112124
if (!json.result) {
113125
return {
114126
error: "An unknown error occurred, please try again later.",

apps/dashboard/src/@/components/analytics/stat.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ export const StatCard: React.FC<{
66
icon: React.FC<{ className?: string }>;
77
formatter?: (value: number) => string;
88
isPending: boolean;
9-
}> = ({ label, value, formatter, icon: Icon, isPending }) => {
9+
emptyText?: string;
10+
}> = ({ label, value, formatter, icon: Icon, isPending, emptyText }) => {
1011
return (
1112
<dl className="flex items-center justify-between gap-4 rounded-lg border border-border bg-card p-4 pr-6">
1213
<div>
1314
<dd className="mb-0.5 font-semibold text-2xl tracking-tight">
1415
{isPending ? (
1516
<Skeleton className="h-8 w-20" />
17+
) : emptyText ? (
18+
<span className="text-muted-foreground">{emptyText}</span>
1619
) : value !== undefined && formatter ? (
1720
formatter(value)
1821
) : (

0 commit comments

Comments
 (0)