@panoptic-eng/sdk 1.0.42 → 1.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5133,8 +5133,9 @@ function computeUniswapFeesForBlock(blockData, legs) {
5133
5133
  const feesAbove1 = currentTick < leg.upperTick ? upper.feeGrowthOutside1 : feeGrowthGlobal1 - upper.feeGrowthOutside1;
5134
5134
  const fees0 = (feeGrowthGlobal0 - feesBelow0 - feesAbove0) * leg.liquidity / (1n << 128n);
5135
5135
  const fees1 = (feeGrowthGlobal1 - feesBelow1 - feesAbove1) * leg.liquidity / (1n << 128n);
5136
- total0 += fees0;
5137
- total1 += fees1;
5136
+ const direction = leg.isLong === true ? -1n : 1n;
5137
+ total0 += direction * fees0;
5138
+ total1 += direction * fees1;
5138
5139
  }
5139
5140
  return {
5140
5141
  total0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoptic-eng/sdk",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/panoptic-labs/panoptic-sdk.git"