@magmaprotocol/magma-clmm-sdk 0.5.5 → 0.5.6
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1032,8 +1032,8 @@ var ClmmPoolUtil = class {
|
|
|
1032
1032
|
liquidity = estimateLiquidityForCoinB(curSqrtPrice, lowerSqrtPrice, coinAmount);
|
|
1033
1033
|
}
|
|
1034
1034
|
const coinAmounts = ClmmPoolUtil.getCoinAmountFromLiquidity(liquidity, curSqrtPrice, lowerSqrtPrice, upperSqrtPrice, roundUp);
|
|
1035
|
-
const tokenLimitA =
|
|
1036
|
-
const tokenLimitB =
|
|
1035
|
+
const tokenLimitA = roundUp ? d(coinAmounts.coinA.toString()).mul(1 + slippage).toString() : d(coinAmounts.coinA.toString()).mul(1 - slippage).toString();
|
|
1036
|
+
const tokenLimitB = roundUp ? d(coinAmounts.coinB.toString()).mul(1 + slippage).toString() : d(coinAmounts.coinB.toString()).mul(1 - slippage).toString();
|
|
1037
1037
|
return {
|
|
1038
1038
|
coinAmountA: coinAmounts.coinA,
|
|
1039
1039
|
coinAmountB: coinAmounts.coinB,
|