@meteora-ag/dlmm 1.4.7-rc.0 → 1.4.7-rc.1

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.mjs CHANGED
@@ -14265,10 +14265,10 @@ var DLMM = class {
14265
14265
  } else {
14266
14266
  const createPositionOwnerTokenXIx = createAssociatedTokenAccountIdempotentInstruction2(
14267
14267
  payer,
14268
+ positionOwnerTokenX,
14268
14269
  positionOwner,
14269
14270
  this.lbPair.tokenXMint,
14270
- this.tokenX.owner,
14271
- positionOwnerTokenX
14271
+ this.tokenX.owner
14272
14272
  );
14273
14273
  preInstructions.push(createPositionOwnerTokenXIx);
14274
14274
  const transferIx = createTransferCheckedInstruction2(
@@ -14571,9 +14571,15 @@ var DLMM = class {
14571
14571
  this.lbPair,
14572
14572
  this.binArrayBitmapExtension?.account ?? null
14573
14573
  );
14574
+ const marketPriceBinArrayIndex = findNextBinArrayIndexWithLiquidity(
14575
+ swapForY,
14576
+ new BN13(marketPriceBinId),
14577
+ this.lbPair,
14578
+ this.binArrayBitmapExtension?.account ?? null
14579
+ );
14574
14580
  const accountsToFetch = [];
14575
14581
  const binArrayBitMapExtensionPubkey = isOverflowDefaultBinArrayBitmap(
14576
- new BN13(marketPriceBinId)
14582
+ new BN13(marketPriceBinArrayIndex)
14577
14583
  ) ? deriveBinArrayBitmapExtension(this.pubkey, this.program.programId)[0] : null;
14578
14584
  binArrayBitMapExtensionPubkey && accountsToFetch.push(binArrayBitMapExtensionPubkey);
14579
14585
  const [fromBinArrayPubkey] = deriveBinArray(
@@ -14611,7 +14617,6 @@ var DLMM = class {
14611
14617
  preInstructions.push(initializeBitmapExtensionIx);
14612
14618
  }
14613
14619
  }
14614
- console.log({ binArrayBitmapExtension });
14615
14620
  if (!!binArrayAccounts?.[1]) {
14616
14621
  fromBinArray = fromBinArrayPubkey;
14617
14622
  }