Skip to content

Commit 54204e0

Browse files
authored
Merge branch 'main' into use-glyph/add-external-wallet
2 parents 985d72f + e78a984 commit 54204e0

File tree

213 files changed

+9543
-8267
lines changed

Some content is hidden

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

213 files changed

+9543
-8267
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ See our [open source page](https://thirdweb.com/open-source) for more informatio
172172
- [Documentation](https://portal.thirdweb.com/)
173173
- [Templates](https://thirdweb.com/templates)
174174
- [YouTube](https://www.youtube.com/c/thirdweb)
175+
- [X/Twitter](https://x.com/thirdweb)
176+
- [Telegram](https://t.me/officialthirdweb)
175177

176178
## Support
177179

apps/dashboard/knip.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
],
99
"ignoreBinaries": ["only-allow"],
1010
"ignoreDependencies": [
11+
"@thirdweb-dev/api",
1112
"@thirdweb-dev/service-utils",
1213
"@thirdweb-dev/vault-sdk",
1314
"thirdweb",

apps/dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@shazow/whatsabi": "0.22.2",
2424
"@tanstack/react-query": "5.81.5",
2525
"@tanstack/react-table": "^8.21.3",
26+
"@thirdweb-dev/api": "workspace:*",
2627
"@thirdweb-dev/service-utils": "workspace:*",
2728
"@thirdweb-dev/vault-sdk": "workspace:*",
2829
"@vercel/functions": "2.2.2",

apps/dashboard/src/@/api/universal-bridge/developer.ts

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -297,38 +297,53 @@ export type PaymentsResponse = {
297297
totalCount: number;
298298
};
299299
};
300+
301+
type BridgePaymentType = "buy" | "sell" | "transfer";
302+
type OnrampPaymentType = "onramp";
303+
300304
export type Payment = {
305+
// common
301306
id: string;
302-
blockNumber?: bigint;
303-
transactionId: string;
307+
createdAt: string;
304308
clientId: string;
305-
sender: string;
306309
receiver: string;
307-
developerFeeRecipient: string;
308-
developerFeeBps: number;
309310
transactions: Array<{
310311
chainId: number;
311312
transactionHash: string;
312313
}>;
313314
status: "PENDING" | "COMPLETED" | "FAILED" | "NOT_FOUND";
314-
type: "buy" | "sell" | "transfer";
315-
originAmount: bigint;
316-
destinationAmount: bigint;
317-
purchaseData: unknown;
318-
originToken: {
319-
address: string;
320-
symbol: string;
321-
decimals: number;
322-
chainId: number;
323-
};
315+
316+
destinationAmount: string;
324317
destinationToken: {
325318
address: string;
326319
symbol: string;
327320
decimals: number;
328321
chainId: number;
329322
};
330-
createdAt: string;
331-
};
323+
purchaseData: unknown;
324+
} & (
325+
| {
326+
type: BridgePaymentType;
327+
transactionId: string;
328+
blockNumber?: string;
329+
sender: string;
330+
developerFeeRecipient: string;
331+
developerFeeBps: number;
332+
originAmount: string;
333+
originToken: {
334+
address: string;
335+
symbol: string;
336+
decimals: number;
337+
chainId: number;
338+
};
339+
}
340+
| {
341+
onrampId: string;
342+
type: OnrampPaymentType;
343+
}
344+
);
345+
346+
export type BridgePayment = Extract<Payment, { type: BridgePaymentType }>;
332347

333348
export async function getPayments(props: {
334349
clientId: string;

apps/dashboard/src/@/components/blocks/code/code-segment.client.tsx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
"use client";
2+
23
import type React from "react";
34
import { type Dispatch, type SetStateAction, useMemo } from "react";
45
import { CodeClient } from "@/components/ui/code/code.client";
56
import { TabButtons } from "@/components/ui/tabs";
67
import { cn } from "@/lib/utils";
78

89
export type CodeEnvironment =
10+
| "api"
911
| "javascript"
1012
| "typescript"
1113
| "react"
1214
| "react-native"
13-
| "unity";
15+
| "dotnet"
16+
| "unity"
17+
| "curl";
1418

1519
type SupportedEnvironment = {
1620
environment: CodeEnvironment;
@@ -20,6 +24,10 @@ type SupportedEnvironment = {
2024
type CodeSnippet = Partial<Record<CodeEnvironment, string>>;
2125

2226
const Environments: SupportedEnvironment[] = [
27+
{
28+
environment: "api",
29+
title: "API",
30+
},
2331
{
2432
environment: "javascript",
2533
title: "JavaScript",
@@ -36,10 +44,18 @@ const Environments: SupportedEnvironment[] = [
3644
environment: "react-native",
3745
title: "React Native",
3846
},
47+
{
48+
environment: "dotnet",
49+
title: ".NET",
50+
},
3951
{
4052
environment: "unity",
4153
title: "Unity",
4254
},
55+
{
56+
environment: "curl",
57+
title: "cURL",
58+
},
4359
];
4460

4561
interface CodeSegmentProps {
@@ -122,9 +138,14 @@ export const CodeSegment: React.FC<CodeSegmentProps> = ({
122138
: activeEnvironment === "react" ||
123139
activeEnvironment === "react-native"
124140
? "tsx"
125-
: activeEnvironment === "unity"
141+
: activeEnvironment === "unity" ||
142+
activeEnvironment === "dotnet"
126143
? "cpp"
127-
: activeEnvironment
144+
: activeEnvironment === "api"
145+
? "javascript"
146+
: activeEnvironment === "curl"
147+
? "bash"
148+
: activeEnvironment
128149
}
129150
/>
130151
)}

apps/dashboard/src/@/components/blocks/project-page/project-page-header.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,15 @@ type Action =
2323
component: React.ReactNode;
2424
};
2525

26-
function Action(props: { action: Action; variant?: "default" | "secondary" }) {
26+
function Action(props: { action: Action; variant?: "default" | "outline" }) {
2727
const action = props.action;
2828

2929
return "component" in action ? (
3030
action.component
3131
) : (
3232
<Button
3333
asChild
34-
className={cn(
35-
"rounded-full",
36-
props.variant === "secondary" && "border border-border",
37-
)}
34+
className={cn("rounded-full")}
3835
size="sm"
3936
variant={props.variant}
4037
>
@@ -60,7 +57,7 @@ export type ProjectPageHeaderProps = {
6057
icon: React.FC<{ className?: string }>;
6158
isProjectIcon?: boolean;
6259
actions: {
63-
primary: Action;
60+
primary?: Action;
6461
secondary?: Action;
6562
} | null;
6663

@@ -114,7 +111,7 @@ export function ProjectPageHeader(props: ProjectPageHeaderProps) {
114111
{props.actions && (
115112
<div className="hidden lg:flex items-center gap-3">
116113
{props.actions.secondary && (
117-
<Action action={props.actions.secondary} variant="secondary" />
114+
<Action action={props.actions.secondary} variant="outline" />
118115
)}
119116

120117
{props.actions.primary && (
@@ -132,7 +129,7 @@ export function ProjectPageHeader(props: ProjectPageHeaderProps) {
132129
{props.title}
133130
</h2>
134131
{/* description */}
135-
<p className="text-sm text-muted-foreground line-clamp-3 md:line-clamp-2">
132+
<p className="text-sm text-muted-foreground text-pretty">
136133
{props.description}
137134
</p>
138135
</div>
@@ -145,7 +142,7 @@ export function ProjectPageHeader(props: ProjectPageHeaderProps) {
145142
)}
146143

147144
{props.actions?.secondary && (
148-
<Action action={props.actions.secondary} variant="secondary" />
145+
<Action action={props.actions.secondary} variant="outline" />
149146
)}
150147
</div>
151148
)}

0 commit comments

Comments
 (0)