@meteora-ag/dlmm 1.5.0-test.0 → 1.5.0

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
@@ -10359,9 +10359,11 @@ var DLMM = class {
10359
10359
  */
10360
10360
  static async create(connection, dlmm, opt) {
10361
10361
  const cluster = _optionalChain([opt, 'optionalAccess', _38 => _38.cluster]) || "mainnet-beta";
10362
- const provider = new (0, _anchor.AnchorProvider)(connection, {}, {
10363
- commitment: "confirmed"
10364
- });
10362
+ const provider = new (0, _anchor.AnchorProvider)(
10363
+ connection,
10364
+ {},
10365
+ _anchor.AnchorProvider.defaultOptions()
10366
+ );
10365
10367
  const program = new (0, _anchor.Program)(
10366
10368
  IDL,
10367
10369
  _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _39 => _39.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
@@ -11343,9 +11345,7 @@ var DLMM = class {
11343
11345
  tokenBadgeX,
11344
11346
  tokenBadgeY
11345
11347
  ]);
11346
- const presetParameterState = await program.account.presetParameter2.fetch(
11347
- presetParameter
11348
- );
11348
+ const presetParameterState = await program.account.presetParameter2.fetch(presetParameter);
11349
11349
  const existsPool = await this.getPairPubkeyIfExists(
11350
11350
  connection,
11351
11351
  tokenX,
@@ -12545,9 +12545,7 @@ var DLMM = class {
12545
12545
  slippage
12546
12546
  }) {
12547
12547
  const maxActiveBinSlippage = slippage ? Math.ceil(slippage / (this.lbPair.binStep / 100)) : MAX_ACTIVE_BIN_SLIPPAGE;
12548
- const positionAccount = await this.program.account.positionV2.fetch(
12549
- positionPubKey
12550
- );
12548
+ const positionAccount = await this.program.account.positionV2.fetch(positionPubKey);
12551
12549
  const { lowerBinId, upperBinId, binIds } = this.processXYAmountDistribution(xYAmountDistribution);
12552
12550
  if (lowerBinId < positionAccount.lowerBinId)
12553
12551
  throw new Error(