@meteora-ag/dlmm 1.2.2 → 1.2.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 +3 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -2
package/dist/index.mjs
CHANGED
|
@@ -9337,18 +9337,15 @@ var DLMM = class {
|
|
|
9337
9337
|
const maxBinArrayIndex = binIdToBinArrayIndex(new BN9(maxBinId));
|
|
9338
9338
|
const useExtension = isOverflowDefaultBinArrayBitmap(minBinArrayIndex) || isOverflowDefaultBinArrayBitmap(maxBinArrayIndex);
|
|
9339
9339
|
const binArrayBitmapExtension = useExtension ? deriveBinArrayBitmapExtension(this.pubkey, this.program.programId)[0] : null;
|
|
9340
|
-
const activeId = this.lbPair.activeId;
|
|
9341
9340
|
const strategyParameters = toStrategyParameters(strategy);
|
|
9342
|
-
const
|
|
9341
|
+
const positionAccount = await this.program.account.positionV2.fetch(positionPubKey);
|
|
9342
|
+
const lowerBinArrayIndex = binIdToBinArrayIndex(new BN9(positionAccount.lowerBinId));
|
|
9343
|
+
const upperBinArrayIndex = lowerBinArrayIndex.add(new BN9(1));
|
|
9343
9344
|
const [binArrayLower] = deriveBinArray(
|
|
9344
9345
|
this.pubkey,
|
|
9345
9346
|
lowerBinArrayIndex,
|
|
9346
9347
|
this.program.programId
|
|
9347
9348
|
);
|
|
9348
|
-
const upperBinArrayIndex = BN9.max(
|
|
9349
|
-
lowerBinArrayIndex.add(new BN9(1)),
|
|
9350
|
-
binIdToBinArrayIndex(new BN9(maxBinId))
|
|
9351
|
-
);
|
|
9352
9349
|
const [binArrayUpper] = deriveBinArray(
|
|
9353
9350
|
this.pubkey,
|
|
9354
9351
|
upperBinArrayIndex,
|