Skip to content

Commit c42db48

Browse files
authored
Merge branch 'main' into ai-migration-guide
2 parents f8e468d + bb89561 commit c42db48

File tree

176 files changed

+3544
-6300
lines changed

Some content is hidden

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

176 files changed

+3544
-6300
lines changed

.changeset/quiet-llamas-chew.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/ai-sdk-provider": patch
3+
---
4+
5+
Update sign swap action type

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/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
)}

0 commit comments

Comments
 (0)