@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.mjs
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 BN9(minBinId));
|
|
7613
|
-
const upperBinArrayIndex =
|
|
7613
|
+
const upperBinArrayIndex = binIdToBinArrayIndex(new BN9(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 BN9(idx));
|
|
7618
7618
|
const binArraysCount = (await this.binArraysToBeCreate(binArraysNeeded)).length;
|
|
7619
7619
|
const positionCount = Math.ceil((maxBinId - minBinId) / MAX_BIN_PER_TX);
|