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<
117
117
*
118
118
* This details will be stored with the purchase and can be retrieved later via the status API or Webhook
119
119
*/
120
- purchaseData ?: object ;
120
+ purchaseData ?: Record < string , unknown > ;
121
121
122
122
/**
123
123
* 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 =
65
65
testMode ?: boolean ;
66
66
preferredProvider ?: FiatProvider ;
67
67
} ;
68
- purchaseData ?: object ;
68
+ purchaseData ?: Record < string , unknown > ;
69
69
/**
70
70
* Callback to be called when the user successfully completes the purchase.
71
71
*/
Original file line number Diff line number Diff line change @@ -363,9 +363,7 @@ export function PayEmbed(props: PayEmbedProps) {
363
363
? [ "card" ]
364
364
: [ "crypto" , "card" ]
365
365
}
366
- purchaseData = {
367
- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
368
- }
366
+ purchaseData = { props . payOptions ?. purchaseData }
369
367
theme = { theme }
370
368
title = { metadata ?. name || "Buy" }
371
369
tokenAddress = {
@@ -390,9 +388,7 @@ export function PayEmbed(props: PayEmbedProps) {
390
388
? [ "crypto" ]
391
389
: [ "crypto" , "card" ]
392
390
}
393
- purchaseData = {
394
- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
395
- }
391
+ purchaseData = { props . payOptions ?. purchaseData }
396
392
seller = { props . payOptions . paymentInfo . sellerAddress as Address }
397
393
theme = { theme }
398
394
tokenAddress = {
@@ -414,9 +410,7 @@ export function PayEmbed(props: PayEmbedProps) {
414
410
? [ "crypto" ]
415
411
: [ "crypto" , "card" ]
416
412
}
417
- purchaseData = {
418
- props . payOptions ?. purchaseData as Record < string , unknown > | undefined
419
- }
413
+ purchaseData = { props . payOptions ?. purchaseData }
420
414
theme = { theme }
421
415
title = { metadata ?. name }
422
416
transaction = { props . payOptions . transaction }
You can’t perform that action at this time.
0 commit comments