Skip to content

Commit

Permalink
fix bn imports
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedragon committed May 16, 2024
1 parent 8304c1c commit 9a079ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion projects/spark/src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9a079ff

Please sign in to comment.