@meteora-ag/cp-amm-sdk 1.1.2-rc.0 → 1.1.3
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 +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9109,16 +9109,20 @@ var CpAmm = class {
|
|
|
9109
9109
|
if (tokenAAmount.eq(new (0, _anchor.BN)(0)) && tokenBAmount.eq(new (0, _anchor.BN)(0))) {
|
|
9110
9110
|
throw new Error("Invalid input amount");
|
|
9111
9111
|
}
|
|
9112
|
-
const actualAmountAIn = tokenAInfo ?
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9112
|
+
const actualAmountAIn = tokenAInfo ? tokenAAmount.sub(
|
|
9113
|
+
calculateTransferFeeIncludedAmount(
|
|
9114
|
+
tokenAAmount,
|
|
9115
|
+
tokenAInfo.mint,
|
|
9116
|
+
tokenAInfo.currentEpoch
|
|
9117
|
+
).transferFee
|
|
9118
|
+
) : tokenAAmount;
|
|
9119
|
+
const actualAmountBIn = tokenBInfo ? tokenBAmount.sub(
|
|
9120
|
+
calculateTransferFeeIncludedAmount(
|
|
9121
|
+
tokenBAmount,
|
|
9122
|
+
tokenBInfo.mint,
|
|
9123
|
+
tokenBInfo.currentEpoch
|
|
9124
|
+
).transferFee
|
|
9125
|
+
) : tokenBAmount;
|
|
9122
9126
|
const initSqrtPrice = calculateInitSqrtPrice(
|
|
9123
9127
|
tokenAAmount,
|
|
9124
9128
|
tokenBAmount,
|