@meteora-ag/dlmm 1.0.26 → 1.0.27
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 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7610,10 +7610,10 @@ var DLMM = class {
|
|
|
7610
7610
|
async quoteCreatePosition({ strategy }) {
|
|
7611
7611
|
const { minBinId, maxBinId } = strategy;
|
|
7612
7612
|
const lowerBinArrayIndex = binIdToBinArrayIndex(new (0, _anchor.BN)(minBinId));
|
|
7613
|
-
const upperBinArrayIndex =
|
|
7613
|
+
const upperBinArrayIndex = binIdToBinArrayIndex(new (0, _anchor.BN)(maxBinId));
|
|
7614
7614
|
const binArraysNeeded = Array.from(
|
|
7615
|
-
{ length: upperBinArrayIndex.sub(lowerBinArrayIndex).toNumber() +
|
|
7616
|
-
(_, index) => index
|
|
7615
|
+
{ length: upperBinArrayIndex.sub(lowerBinArrayIndex).toNumber() + 1 },
|
|
7616
|
+
(_, index) => index + lowerBinArrayIndex.toNumber()
|
|
7617
7617
|
).map((idx) => new (0, _anchor.BN)(idx));
|
|
7618
7618
|
const binArraysCount = (await this.binArraysToBeCreate(binArraysNeeded)).length;
|
|
7619
7619
|
const positionCount = Math.ceil((maxBinId - minBinId) / MAX_BIN_PER_TX);
|