@meteora-ag/dlmm 1.4.6-rc.1 → 1.4.6-rc.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
@@ -14572,11 +14572,10 @@ var DLMM = class {
14572
14572
  _nullishCoalesce(_optionalChain([this, 'access', _94 => _94.binArrayBitmapExtension, 'optionalAccess', _95 => _95.account]), () => ( null))
14573
14573
  );
14574
14574
  const accountsToFetch = [];
14575
- const [binArrayBitMapExtensionPubkey] = deriveBinArrayBitmapExtension(
14576
- this.pubkey,
14577
- this.program.programId
14578
- );
14579
- accountsToFetch.push(binArrayBitMapExtensionPubkey);
14575
+ const binArrayBitMapExtensionPubkey = isOverflowDefaultBinArrayBitmap(
14576
+ fromBinArrayIndex
14577
+ ) ? deriveBinArrayBitmapExtension(this.pubkey, this.program.programId)[0] : null;
14578
+ binArrayBitMapExtensionPubkey && accountsToFetch.push(binArrayBitMapExtensionPubkey);
14580
14579
  const [fromBinArrayPubkey] = deriveBinArray(
14581
14580
  this.pubkey,
14582
14581
  fromBinArrayIndex,
@@ -14601,15 +14600,17 @@ var DLMM = class {
14601
14600
  let fromBinArray = null;
14602
14601
  let toBinArray = null;
14603
14602
  let binArrayBitmapExtension = null;
14604
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _96 => _96[0]])) {
14605
- binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
14606
- } else {
14607
- const initializeBitmapExtensionIx = await this.program.methods.initializeBinArrayBitmapExtension().accounts({
14608
- binArrayBitmapExtension: binArrayBitMapExtensionPubkey,
14609
- funder: owner,
14610
- lbPair: this.pubkey
14611
- }).instruction();
14612
- preInstructions.push(initializeBitmapExtensionIx);
14603
+ if (binArrayBitMapExtensionPubkey) {
14604
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _96 => _96[0]])) {
14605
+ binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
14606
+ } else {
14607
+ const initializeBitmapExtensionIx = await this.program.methods.initializeBinArrayBitmapExtension().accounts({
14608
+ binArrayBitmapExtension: binArrayBitMapExtensionPubkey,
14609
+ funder: owner,
14610
+ lbPair: this.pubkey
14611
+ }).instruction();
14612
+ preInstructions.push(initializeBitmapExtensionIx);
14613
+ }
14613
14614
  }
14614
14615
  if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _97 => _97[1]])) {
14615
14616
  fromBinArray = fromBinArrayPubkey;