Skip to content

Commit 1cc003d

Browse files
committed
feat: TransactionWidget
1 parent 355eecd commit 1cc003d

File tree

14 files changed

+675
-464
lines changed

14 files changed

+675
-464
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function UBFooter() {
123123
href: "https://playground.thirdweb.com/connect/pay/fund-wallet",
124124
},
125125
{
126-
label: "Commerce",
126+
label: "Checkout",
127127
href: "https://playground.thirdweb.com/connect/pay/commerce",
128128
},
129129
{

apps/playground-web/src/app/connect/pay/commerce/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { Metadata } from "next";
77

88
export const metadata: Metadata = {
99
metadataBase,
10-
title: "Integrate Fiat & Cross-Chain Crypto Payments | thirdweb Pay",
10+
title: "Integrate Fiat & Cross-Chain Crypto Payments | Universal Bridge",
1111
description:
1212
"The easiest way for users to transact in your app. Onramp users in clicks and generate revenue for each user transaction. Integrate for free.",
1313
};
@@ -34,7 +34,7 @@ function BuyMerch() {
3434
return (
3535
<CodeExample
3636
header={{
37-
title: "Commerce",
37+
title: "Checkout",
3838
description: (
3939
<>
4040
Take payments from Fiat or Crypto directly to your seller wallet.
@@ -60,7 +60,7 @@ function BuyMerch() {
6060
seller="0xEb0effdFB4dC5b3d5d3aC6ce29F3ED213E95d675"
6161
feePayer="seller"
6262
name="Black Hoodie"
63-
description="Size L. Ships worldwide."
63+
description="Size L | Ships worldwide."
6464
/>
6565
);
6666
};`}
Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
1-
import type { Chain } from "thirdweb";
2-
import type { LocaleId, ThemeOverrides, TokenInfo } from "thirdweb/react";
3-
import type { WalletId } from "thirdweb/wallets";
1+
import type { Address, Chain } from "thirdweb";
2+
import type { ThemeOverrides } from "thirdweb/react";
43

5-
export type PayEmbedPlaygroundOptions = {
4+
export type BridgeComponentsPlaygroundOptions = {
65
theme: {
76
type: "dark" | "light";
87
darkColorOverrides: ThemeOverrides["colors"];
98
lightColorOverrides: ThemeOverrides["colors"];
109
};
1110
payOptions: {
12-
mode?: "fund_wallet" | "direct_payment" | "transaction";
11+
widget?: "buy" | "checkout" | "transaction";
1312
title: string | undefined;
1413
image: string | undefined;
1514
description: string | undefined;
1615

17-
// fund_wallet mode options
18-
buyTokenAddress: string | undefined;
19-
buyTokenAmount: string | undefined;
20-
buyTokenChain: Chain | undefined;
21-
buyTokenInfo?: TokenInfo;
22-
buyWithCrypto?: boolean;
23-
buyWithFiat?: boolean;
16+
buyTokenAddress: Address;
17+
buyTokenAmount: string;
18+
buyTokenChain: Chain;
2419

2520
// direct_payment mode options
26-
sellerAddress?: string;
21+
sellerAddress: Address;
2722

2823
// transaction mode options
2924
transactionData?: string; // Simplified for demo; could be more complex in real implementation
3025
};
31-
connectOptions: {
32-
walletIds: WalletId[];
33-
modalTitle: string | undefined;
34-
modalTitleIcon: string | undefined;
35-
localeId: LocaleId;
36-
enableAuth: boolean;
37-
enableAccountAbstraction: boolean;
38-
termsOfServiceLink: string | undefined;
39-
privacyPolicyLink: string | undefined;
40-
buttonLabel: string | undefined;
41-
ShowThirdwebBranding: boolean;
42-
requireApproval: boolean;
43-
};
4426
};

0 commit comments

Comments
 (0)