From f37e6f36fbc8542c440779ffc36b0fec8659b77a Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:05:41 +0800 Subject: [PATCH] fix(billboard): fallback event args --- handlers/clear-auction-and-distribute-tax.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers/clear-auction-and-distribute-tax.ts b/handlers/clear-auction-and-distribute-tax.ts index f01a72f..b07ff2f 100644 --- a/handlers/clear-auction-and-distribute-tax.ts +++ b/handlers/clear-auction-and-distribute-tax.ts @@ -26,11 +26,11 @@ export const handler = async ( console.log(`Context: ${JSON.stringify(context, null, 2)}`) const slack = new Slack() - const fromTokenId = BigInt(event.fromTokenId) || BigInt(0) - const toTokenId = BigInt(event.toTokenId) || BigInt(0) - const fromBlock = BigInt(event.fromBlock) || BigInt(0) - const toBlock = BigInt(event.toBlock) || BigInt(0) - const amount = BigInt(event.amount) || BigInt(0) + const fromTokenId = BigInt(event.fromTokenId || 0) + const toTokenId = BigInt(event.toTokenId || 0) + const fromBlock = BigInt(event.fromBlock || 0) + const toBlock = BigInt(event.toBlock || 0) + const amount = BigInt(event.amount || 0) const merkleRoot = event.merkleRoot as `0x${string}` const treeId = `${fromBlock}-${toBlock}`