@meteora-ag/dlmm 1.5.0-rc.4 → 1.5.0-rc.5
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 +5 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14417,9 +14417,7 @@ var DLMM = class {
|
|
|
14417
14417
|
tokenBadgeX,
|
|
14418
14418
|
tokenBadgeY
|
|
14419
14419
|
]);
|
|
14420
|
-
const presetParameterState = await program.account.presetParameter2.fetch(
|
|
14421
|
-
presetParameter
|
|
14422
|
-
);
|
|
14420
|
+
const presetParameterState = await program.account.presetParameter2.fetch(presetParameter);
|
|
14423
14421
|
const existsPool = await this.getPairPubkeyIfExists(
|
|
14424
14422
|
connection,
|
|
14425
14423
|
tokenX,
|
|
@@ -15186,8 +15184,8 @@ var DLMM = class {
|
|
|
15186
15184
|
);
|
|
15187
15185
|
initPositionIxs.push(initPositionIx);
|
|
15188
15186
|
const binArrayIndexes = getBinArrayIndexesCoverage(
|
|
15189
|
-
new (0, _anchor.BN)(
|
|
15190
|
-
new (0, _anchor.BN)(
|
|
15187
|
+
new (0, _anchor.BN)(lowerBinId),
|
|
15188
|
+
new (0, _anchor.BN)(upperBinId)
|
|
15191
15189
|
).filter((idx) => !binArrayIndexSet.has(idx.toNumber()));
|
|
15192
15190
|
const createBinArrayIxs = await this.createBinArraysIfNeeded(
|
|
15193
15191
|
binArrayIndexes,
|
|
@@ -16106,9 +16104,7 @@ var DLMM = class {
|
|
|
16106
16104
|
slippage
|
|
16107
16105
|
}) {
|
|
16108
16106
|
const maxActiveBinSlippage = slippage ? Math.ceil(slippage / (this.lbPair.binStep / 100)) : MAX_ACTIVE_BIN_SLIPPAGE;
|
|
16109
|
-
const positionAccount = await this.program.account.positionV2.fetch(
|
|
16110
|
-
positionPubKey
|
|
16111
|
-
);
|
|
16107
|
+
const positionAccount = await this.program.account.positionV2.fetch(positionPubKey);
|
|
16112
16108
|
const { lowerBinId, upperBinId, binIds } = this.processXYAmountDistribution(xYAmountDistribution);
|
|
16113
16109
|
if (lowerBinId < positionAccount.lowerBinId)
|
|
16114
16110
|
throw new Error(
|
|
@@ -16482,7 +16478,7 @@ var DLMM = class {
|
|
|
16482
16478
|
preInstructions.push(createUserTokenXIx);
|
|
16483
16479
|
preInstructions.push(createUserTokenYIx);
|
|
16484
16480
|
const binArrayBitmapExtension = this.binArrayBitmapExtension ? this.binArrayBitmapExtension.publicKey : this.program.programId;
|
|
16485
|
-
const removeLiquidityTx = await this.program.methods.removeLiquidityByRange2(
|
|
16481
|
+
const removeLiquidityTx = await this.program.methods.removeLiquidityByRange2(lowerBinId, upperBinId, bps.toNumber(), {
|
|
16486
16482
|
slices
|
|
16487
16483
|
}).accountsPartial({
|
|
16488
16484
|
position,
|