@meteora-ag/dlmm 1.5.0-rc.2 → 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 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)(minBinId),
15190
- new (0, _anchor.BN)(maxBinId)
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,
@@ -15651,14 +15649,14 @@ var DLMM = class {
15651
15649
  return {
15652
15650
  initPositionIxs: initPositionIxs.map((ixs) => {
15653
15651
  return new (0, _web3js.Transaction)({
15654
- feePayer: this.lbPair.creator,
15652
+ feePayer: user,
15655
15653
  blockhash,
15656
15654
  lastValidBlockHeight
15657
15655
  }).add(...ixs);
15658
15656
  }),
15659
15657
  addLiquidityIxs: addLiquidityIxs.map((ixs) => {
15660
15658
  return new (0, _web3js.Transaction)({
15661
- feePayer: this.lbPair.creator,
15659
+ feePayer: user,
15662
15660
  blockhash,
15663
15661
  lastValidBlockHeight
15664
15662
  }).add(...ixs);
@@ -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(fromBinId, toBinId, bps.toNumber(), {
16481
+ const removeLiquidityTx = await this.program.methods.removeLiquidityByRange2(lowerBinId, upperBinId, bps.toNumber(), {
16486
16482
  slices
16487
16483
  }).accountsPartial({
16488
16484
  position,