Skip to content

Commit ed5ce8a

Browse files
committed
update
1 parent 9d17bdc commit ed5ce8a

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/PayEmbedSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export function BuyTokenEmbed(props: {
6464
}}
6565
theme={themeObj}
6666
tokenAddress={props.tokenAddress as `0x${string}`}
67+
paymentMethods={["card"]}
6768
/>
6869
)}
6970

packages/thirdweb/src/react/web/ui/Bridge/StepRunner.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { Spinner } from "../components/Spinner.js";
2525
import { Text } from "../components/text.js";
2626

2727
interface StepRunnerProps {
28+
title?: string;
2829
request: BridgePrepareRequest;
2930

3031
/**
@@ -64,6 +65,7 @@ interface StepRunnerProps {
6465
}
6566

6667
export function StepRunner({
68+
title,
6769
request,
6870
wallet,
6971
client,
@@ -248,7 +250,7 @@ export function StepRunner({
248250

249251
return (
250252
<Container flex="column" fullHeight p="md">
251-
<ModalHeader onBack={onBack} title="Processing Payment" />
253+
<ModalHeader onBack={onBack} title={title || "Processing Payment"} />
252254

253255
<Spacer y="xl" />
254256

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import type { UIOptions } from "../BridgeOrchestrator.js";
2121
import { PaymentOverview } from "./PaymentOverview.js";
2222

2323
export interface PaymentDetailsProps {
24+
title?: string;
25+
confirmButtonLabel?: string;
26+
2427
/**
2528
* The UI mode to use
2629
*/
@@ -55,6 +58,8 @@ export interface PaymentDetailsProps {
5558
}
5659

5760
export function PaymentDetails({
61+
title,
62+
confirmButtonLabel,
5863
uiOptions,
5964
client,
6065
paymentMethod,
@@ -262,7 +267,7 @@ export function PaymentDetails({
262267

263268
return (
264269
<Container flex="column" fullHeight p="md">
265-
<ModalHeader onBack={onBack} title="Payment Details" />
270+
<ModalHeader onBack={onBack} title={title || "Payment Details"} />
266271

267272
<Spacer y="xl" />
268273

@@ -427,7 +432,7 @@ export function PaymentDetails({
427432
{/* Action Buttons */}
428433
<Container flex="column" gap="sm">
429434
<Button fullWidth onClick={handleConfirm} variant="accent">
430-
Confirm Payment
435+
{confirmButtonLabel || "Confirm Payment"}
431436
</Button>
432437
</Container>
433438
</Container>

packages/thirdweb/src/react/web/ui/Bridge/swap-widget/SwapWidget.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ function SwapWidgetContent(props: SwapWidgetProps) {
352352
if (screen.id === "2:preview") {
353353
return (
354354
<PaymentDetails
355+
title="Review Swap"
356+
confirmButtonLabel="Swap"
355357
client={props.client}
356358
onBack={() => {
357359
setScreen({ id: "1:swap-ui" });
@@ -384,6 +386,7 @@ function SwapWidgetContent(props: SwapWidgetProps) {
384386
if (screen.id === "3:execute") {
385387
return (
386388
<StepRunner
389+
title="Processing Swap"
387390
autoStart={true}
388391
client={props.client}
389392
onBack={() => {

packages/thirdweb/src/stories/Bridge/Swap/SwapWidget.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { Meta } from "@storybook/react-vite";
1+
import type { Meta } from "@storybook/react";
22
import { lightTheme } from "../../../react/core/design-system/index.js";
33
import { SwapWidget } from "../../../react/web/ui/Bridge/swap-widget/SwapWidget.js";
44
import { ConnectButton } from "../../../react/web/ui/ConnectWallet/ConnectButton.js";
55
import { storyClient } from "../../utils.js";
66

7-
const meta = {
7+
const meta: Meta<typeof SwapWidget> = {
88
parameters: {
99
layout: "centered",
1010
},
@@ -27,7 +27,7 @@ const meta = {
2727
);
2828
},
2929
],
30-
} satisfies Meta<typeof SwapWidget>;
30+
};
3131
export default meta;
3232

3333
export function BasicUsage() {

0 commit comments

Comments
 (0)