@alephium/powfi-sdk 0.0.1-rc.19 → 0.0.1-rc.20

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.
package/lib/index.js CHANGED
@@ -15924,11 +15924,12 @@ var PoolUtils = class {
15924
15924
  static offlineSwap(liqDist, amountSpecified, sqrtPriceX96) {
15925
15925
  const exactIn = amountSpecified > 0n;
15926
15926
  let amountCalculated = 0n;
15927
+ let liquidity = liqDist.liquidity;
15927
15928
  for (const row of liqDist.rows) {
15928
15929
  const [sqrtPriceNextX96, amountIn, amountOut, feeAmount] = this.computeSwapStep(
15929
15930
  sqrtPriceX96,
15930
15931
  row.sqrtPriceX96,
15931
- row.liquidity,
15932
+ liquidity,
15932
15933
  amountSpecified,
15933
15934
  liqDist.fee
15934
15935
  );
@@ -15940,6 +15941,7 @@ var PoolUtils = class {
15940
15941
  amountCalculated += amountIn + feeAmount;
15941
15942
  }
15942
15943
  sqrtPriceX96 = sqrtPriceNextX96;
15944
+ liquidity = row.liquidity;
15943
15945
  }
15944
15946
  return amountCalculated;
15945
15947
  }