-
Notifications
You must be signed in to change notification settings - Fork 559
[Dashboard] Fix: Purchase Data #7225
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
Changes from all commits
916d108
7eed960
4e46698
73f0d2f
d40d14d
ea2ad78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
Fix use of purchaseData in payment links |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -52,8 +52,14 @@ describe("parseIncomingWebhook", () => { | |||||||||||||||||||||||||||||||||||||||||||||
receiver: "0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
type: "transfer", | ||||||||||||||||||||||||||||||||||||||||||||||
transactions: [ | ||||||||||||||||||||||||||||||||||||||||||||||
"0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
"0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
chainId: 1, | ||||||||||||||||||||||||||||||||||||||||||||||
transactionHash: "0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
chainId: 1, | ||||||||||||||||||||||||||||||||||||||||||||||
transactionHash: "0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
54
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix transaction hash format and improve test data diversity. The transaction hashes in the test data appear to be using address format (42 characters) instead of transaction hash format (66 characters). Additionally, both transaction objects use identical values, which reduces test effectiveness. Apply this diff to fix the transaction hash format and add diversity: transactions: [
{
chainId: 1,
- transactionHash: "0x1234567890123456789012345678901234567890",
+ transactionHash: "0x1234567890123456789012345678901234567890123456789012345678901234",
},
{
- chainId: 1,
- transactionHash: "0x1234567890123456789012345678901234567890",
+ chainId: 137,
+ transactionHash: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
},
], 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||
developerFeeBps: 100, | ||||||||||||||||||||||||||||||||||||||||||||||
developerFeeRecipient: "0x1234567890123456789012345678901234567890", | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider more specific typing for
purchaseData
.The
unknown | undefined
type is very broad and could lead to type safety issues downstream. Consider defining a more specific interface or using a generic type parameter to provide better type safety and developer experience.Or define a specific interface:
Also applies to: 31-31
🤖 Prompt for AI Agents