@meteora-ag/cp-amm-sdk 1.1.1 → 1.1.2-rc.0

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 CHANGED
@@ -9109,20 +9109,16 @@ 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 ? 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;
9112
+ const actualAmountAIn = tokenAInfo ? calculateTransferFeeExcludedAmount(
9113
+ tokenAAmount,
9114
+ tokenAInfo.mint,
9115
+ tokenAInfo.currentEpoch
9116
+ ).amount : tokenAAmount;
9117
+ const actualAmountBIn = tokenBInfo ? calculateTransferFeeExcludedAmount(
9118
+ tokenBAmount,
9119
+ tokenBInfo.mint,
9120
+ tokenBInfo.currentEpoch
9121
+ ).amount : tokenBAmount;
9126
9122
  const initSqrtPrice = calculateInitSqrtPrice(
9127
9123
  tokenAAmount,
9128
9124
  tokenBAmount,