From 9a079ff166a04e6ce7e4729a2ea6a573ffceb9cd Mon Sep 17 00:00:00 2001 From: Yulong Date: Wed, 15 May 2024 20:49:41 +0800 Subject: [PATCH] fix bn imports --- package.json | 2 +- projects/spark/src/processor.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c05aefbb..e07eec48 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ ], "type": "module", "dependencies": { - "@sentio/sdk": "^2.36.0-rc.16", + "@sentio/sdk": "^2.36.0-rc.17", "node-fetch": "^3.3.1" }, "resolutions": { diff --git a/projects/spark/src/processor.ts b/projects/spark/src/processor.ts index f8f94cd0..2302ded3 100644 --- a/projects/spark/src/processor.ts +++ b/projects/spark/src/processor.ts @@ -17,7 +17,8 @@ OrderbookProcessor.bind({ // } // }) .onLogTradeEvent(async (trade, ctx) => { - const vol = BigInt(trade.data.trade_price.toString()) * BigInt(trade.data.trade_size.toString()) + + const vol = trade.data.trade_price.mul(trade.data.trade_size) ctx.eventLogger.emit('trade', { distinctId: ctx.transaction?.sender, ...trade,