@meteora-ag/cp-amm-sdk 1.0.1-rc.37 → 1.0.1-rc.38
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/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6878,14 +6878,14 @@ function getSwapAmount(inAmount, sqrtPrice, liquidity, tradeFeeNumerator, aToB,
|
|
|
6878
6878
|
actualInAmount = inAmount.sub(totalFee);
|
|
6879
6879
|
}
|
|
6880
6880
|
const outAmount = aToB ? getAmountBFromLiquidityDelta(
|
|
6881
|
-
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, true),
|
|
6882
|
-
sqrtPrice,
|
|
6883
6881
|
liquidity,
|
|
6882
|
+
sqrtPrice,
|
|
6883
|
+
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, true),
|
|
6884
6884
|
1 /* Down */
|
|
6885
|
-
) :
|
|
6885
|
+
) : getAmountAFromLiquidityDelta(
|
|
6886
|
+
liquidity,
|
|
6886
6887
|
sqrtPrice,
|
|
6887
6888
|
getNextSqrtPrice(actualInAmount, sqrtPrice, liquidity, false),
|
|
6888
|
-
liquidity,
|
|
6889
6889
|
1 /* Down */
|
|
6890
6890
|
);
|
|
6891
6891
|
const amountOut = feeMode.feeOnInput ? outAmount : (totalFee = getTotalFeeOnAmount(outAmount, tradeFeeNumerator), outAmount.sub(totalFee));
|