Skip to content

Commit fd967ce

Browse files
authored
Pass purchaseData prop to payment components (#7507)
1 parent 7ab8808 commit fd967ce

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/short-foxes-decide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix purchaseData propagation in PayEmbed component to new widget implementations

packages/thirdweb/src/react/web/ui/PayEmbed.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ export function PayEmbed(props: PayEmbedProps) {
363363
? ["card"]
364364
: ["crypto", "card"]
365365
}
366+
purchaseData={
367+
props.payOptions?.purchaseData as Record<string, unknown> | undefined
368+
}
366369
theme={theme}
367370
title={metadata?.name || "Buy"}
368371
tokenAddress={
@@ -387,6 +390,9 @@ export function PayEmbed(props: PayEmbedProps) {
387390
? ["crypto"]
388391
: ["crypto", "card"]
389392
}
393+
purchaseData={
394+
props.payOptions?.purchaseData as Record<string, unknown> | undefined
395+
}
390396
seller={props.payOptions.paymentInfo.sellerAddress as Address}
391397
theme={theme}
392398
tokenAddress={
@@ -408,6 +414,9 @@ export function PayEmbed(props: PayEmbedProps) {
408414
? ["crypto"]
409415
: ["crypto", "card"]
410416
}
417+
purchaseData={
418+
props.payOptions?.purchaseData as Record<string, unknown> | undefined
419+
}
411420
theme={theme}
412421
title={metadata?.name}
413422
transaction={props.payOptions.transaction}

0 commit comments

Comments
 (0)