@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.
@@ -20774,8 +20774,9 @@ function computeUniswapFeesForBlock(blockData, legs) {
20774
20774
  const feesAbove1 = currentTick < leg.upperTick ? upper.feeGrowthOutside1 : feeGrowthGlobal1 - upper.feeGrowthOutside1;
20775
20775
  const fees0 = (feeGrowthGlobal0 - feesBelow0 - feesAbove0) * leg.liquidity / (1n << 128n);
20776
20776
  const fees1 = (feeGrowthGlobal1 - feesBelow1 - feesAbove1) * leg.liquidity / (1n << 128n);
20777
- total0 += fees0;
20778
- total1 += fees1;
20777
+ const direction = leg.isLong === true ? -1n : 1n;
20778
+ total0 += direction * fees0;
20779
+ total1 += direction * fees1;
20779
20780
  }
20780
20781
  return {
20781
20782
  total0,