@meteora-ag/dlmm 1.6.0-sam.0 → 1.6.0-sam.2

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
@@ -13892,8 +13892,7 @@ async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercent
13892
13892
  calculatedAddLiquidityCU += DEFAULT_ADD_LIQUIDITY_CU;
13893
13893
  const addLiquidityIxs = [];
13894
13894
  addLiquidityIxs.push(...initBitmapIxs, ...initBinArrayIxs);
13895
- console.log(dlmm.tokenX.publicKey.toBase58(), totalXAmount.toString());
13896
- if (dlmm.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero()) {
13895
+ if (dlmm.tokenX.publicKey.equals(_spltoken.NATIVE_MINT)) {
13897
13896
  const wrapSOLIx = wrapSOLInstruction(
13898
13897
  owner,
13899
13898
  userTokenX,
@@ -13902,7 +13901,7 @@ async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercent
13902
13901
  addLiquidityIxs.push(createUserTokenXIx);
13903
13902
  addLiquidityIxs.push(...wrapSOLIx);
13904
13903
  }
13905
- if (dlmm.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero()) {
13904
+ if (dlmm.tokenY.publicKey.equals(_spltoken.NATIVE_MINT)) {
13906
13905
  const wrapSOLIx = wrapSOLInstruction(
13907
13906
  owner,
13908
13907
  userTokenY,
@@ -15933,7 +15932,7 @@ var DLMM = class {
15933
15932
  const instructionsByPositions = [];
15934
15933
  let startBinId = minBinId;
15935
15934
  const initializeAtaIxs = [];
15936
- if (!this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero()) {
15935
+ if (!this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT)) {
15937
15936
  const ownerAtaX = _spltoken.getAssociatedTokenAddressSync.call(void 0,
15938
15937
  this.tokenX.publicKey,
15939
15938
  owner,
@@ -15950,7 +15949,7 @@ var DLMM = class {
15950
15949
  )
15951
15950
  );
15952
15951
  }
15953
- if (!this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero()) {
15952
+ if (!this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT)) {
15954
15953
  const ownerAtaY = _spltoken.getAssociatedTokenAddressSync.call(void 0,
15955
15954
  this.tokenY.publicKey,
15956
15955
  owner,
@@ -15999,6 +15998,7 @@ var DLMM = class {
15999
15998
  instructionsByPositions.push({
16000
15999
  positionKeypair: position,
16001
16000
  initializePositionIx: initPositionIx,
16001
+ initializeAtaIxs,
16002
16002
  addLiquidityIxs: chunkedAddLiquidityIx
16003
16003
  });
16004
16004
  startBinId = endBinId + 1;