@panoptic-eng/sdk 1.0.43 → 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.
@@ -21038,8 +21038,9 @@ function computeUniswapFeesForBlock(blockData, legs) {
21038
21038
  const feesAbove1 = currentTick < leg.upperTick ? upper.feeGrowthOutside1 : feeGrowthGlobal1 - upper.feeGrowthOutside1;
21039
21039
  const fees0 = (feeGrowthGlobal0 - feesBelow0 - feesAbove0) * leg.liquidity / (1n << 128n);
21040
21040
  const fees1 = (feeGrowthGlobal1 - feesBelow1 - feesAbove1) * leg.liquidity / (1n << 128n);
21041
- total0 += fees0;
21042
- total1 += fees1;
21041
+ const direction = leg.isLong === true ? -1n : 1n;
21042
+ total0 += direction * fees0;
21043
+ total1 += direction * fees1;
21043
21044
  }
21044
21045
  return {
21045
21046
  total0,