File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed
packages/thirdweb/src/react Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ properly type purchaseData
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ export type PayUIOptions = Prettify<
117117 *
118118 * This details will be stored with the purchase and can be retrieved later via the status API or Webhook
119119 */
120- purchaseData ?: object ;
120+ purchaseData ?: Record < string , unknown > ;
121121
122122 /**
123123 * Callback to be called when the user successfully completes the purchase.
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export type SendTransactionPayModalConfig =
6565 testMode ?: boolean ;
6666 preferredProvider ?: FiatProvider ;
6767 } ;
68- purchaseData ?: object ;
68+ purchaseData ?: Record < string , unknown > ;
6969 /**
7070 * Callback to be called when the user successfully completes the purchase.
7171 */
Original file line number Diff line number Diff line change @@ -363,9 +363,7 @@ export function PayEmbed(props: PayEmbedProps) {
363363 ? [ "card" ]
364364 : [ "crypto" , "card" ]
365365 }
366- purchaseData = {
367- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
368- }
366+ purchaseData = { props . payOptions ?. purchaseData }
369367 theme = { theme }
370368 title = { metadata ?. name || "Buy" }
371369 tokenAddress = {
@@ -390,9 +388,7 @@ export function PayEmbed(props: PayEmbedProps) {
390388 ? [ "crypto" ]
391389 : [ "crypto" , "card" ]
392390 }
393- purchaseData = {
394- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
395- }
391+ purchaseData = { props . payOptions ?. purchaseData }
396392 seller = { props . payOptions . paymentInfo . sellerAddress as Address }
397393 theme = { theme }
398394 tokenAddress = {
@@ -414,9 +410,7 @@ export function PayEmbed(props: PayEmbedProps) {
414410 ? [ "crypto" ]
415411 : [ "crypto" , "card" ]
416412 }
417- purchaseData = {
418- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
419- }
413+ purchaseData = { props . payOptions ?. purchaseData }
420414 theme = { theme }
421415 title = { metadata ?. name }
422416 transaction = { props . payOptions . transaction }
You can’t perform that action at this time.
0 commit comments