Skip to content

Commit 2fb7939

Browse files
committed
[thirdweb] Fix webhook transaction schema parsing
1 parent ac4ade6 commit 2fb7939

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/calm-pets-post.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 webhook parsing

packages/thirdweb/src/bridge/Webhook.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ const webhookSchema = z.union([
4646
sender: addressSchema,
4747
receiver: addressSchema,
4848
type: z.string(),
49-
transactions: z.array(hexSchema),
49+
transactions: z.array(
50+
z.object({
51+
chainId: z.coerce.number(),
52+
transactionHash: hexSchema,
53+
}),
54+
),
5055
developerFeeBps: z.coerce.number(),
5156
developerFeeRecipient: addressSchema,
5257
purchaseData: z.record(z.string(), z.unknown()),

0 commit comments

Comments
 (0)