Skip to content

Commit 6c911b6

Browse files
committed
BREAKING: Coerce ub webhook amounts into bigints
1 parent 3e28271 commit 6c911b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/thirdweb/src/bridge/Webhook.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const onchainWebhookSchema = z.discriminatedUnion("version", [
2828
data: z.object({
2929
action: z.enum(["TRANSFER", "BUY", "SELL"]),
3030
clientId: z.string(),
31-
destinationAmount: z.string(),
31+
destinationAmount: z.coerce.bigint(),
3232
destinationToken: tokenSchema,
3333
developerFeeBps: z.coerce.number(),
3434
developerFeeRecipient: addressSchema,
35-
originAmount: z.string(),
35+
originAmount: z.coerce.bigint(),
3636
originToken: tokenSchema,
3737
paymentId: z.string(),
3838
// only exists when the payment was triggered from a developer specified payment link
@@ -62,7 +62,7 @@ const onrampWebhookSchema = z.discriminatedUnion("version", [
6262
}),
6363
z.object({
6464
data: z.object({
65-
amount: z.string(),
65+
amount: z.coerce.bigint(),
6666
currency: z.string(),
6767
currencyAmount: z.number(),
6868
id: z.string(),

0 commit comments

Comments
 (0)