Skip to content

Pass purchaseData prop to payment components #7507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/short-foxes-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix purchaseData propagation in PayEmbed component to new widget implementations
9 changes: 9 additions & 0 deletions packages/thirdweb/src/react/web/ui/PayEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@
? ["card"]
: ["crypto", "card"]
}
purchaseData={
props.payOptions?.purchaseData as Record<string, unknown> | undefined

Check warning on line 367 in packages/thirdweb/src/react/web/ui/PayEmbed.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/PayEmbed.tsx#L366-L367

Added lines #L366 - L367 were not covered by tests
}
theme={theme}
title={metadata?.name || "Buy"}
tokenAddress={
Expand All @@ -387,6 +390,9 @@
? ["crypto"]
: ["crypto", "card"]
}
purchaseData={
props.payOptions?.purchaseData as Record<string, unknown> | undefined

Check warning on line 394 in packages/thirdweb/src/react/web/ui/PayEmbed.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/PayEmbed.tsx#L393-L394

Added lines #L393 - L394 were not covered by tests
}
seller={props.payOptions.paymentInfo.sellerAddress as Address}
theme={theme}
tokenAddress={
Expand All @@ -408,6 +414,9 @@
? ["crypto"]
: ["crypto", "card"]
}
purchaseData={
props.payOptions?.purchaseData as Record<string, unknown> | undefined

Check warning on line 418 in packages/thirdweb/src/react/web/ui/PayEmbed.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/PayEmbed.tsx#L417-L418

Added lines #L417 - L418 were not covered by tests
}
theme={theme}
title={metadata?.name}
transaction={props.payOptions.transaction}
Expand Down
Loading