@meteora-ag/dlmm 1.5.1-test.2 → 1.5.2-rc.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,10 +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
- ..._anchor.AnchorProvider.defaultOptions(),
10364
- commitment: "confirmed"
10365
- });
10362
+ const provider = new (0, _anchor.AnchorProvider)(
10363
+ connection,
10364
+ {},
10365
+ _anchor.AnchorProvider.defaultOptions()
10366
+ );
10366
10367
  const program = new (0, _anchor.Program)(
10367
10368
  IDL,
10368
10369
  _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _39 => _39.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
@@ -10795,6 +10796,7 @@ var DLMM = class {
10795
10796
  const positionsV2 = await program.account.positionV2.all([
10796
10797
  positionOwnerFilter(userPubKey)
10797
10798
  ]);
10799
+ console.log("\u{1F680} ~ DLMM ~ positionsV2:", positionsV2);
10798
10800
  const positionWrappers = [
10799
10801
  ...positionsV2.map((p) => new PositionV2Wrapper(p.publicKey, p.account))
10800
10802
  ];
@@ -10954,6 +10956,7 @@ var DLMM = class {
10954
10956
  rewardMint1,
10955
10957
  positionBinArraysMapV2
10956
10958
  );
10959
+ console.log("\u{1F680} ~ DLMM ~ positionData:", positionData);
10957
10960
  if (positionData) {
10958
10961
  positionsMap.set(lbPair.toBase58(), {
10959
10962
  publicKey: lbPair,
@@ -11853,6 +11856,10 @@ var DLMM = class {
11853
11856
  const positions = [
11854
11857
  ...positionsV2.map((p) => new PositionV2Wrapper(p.publicKey, p.account))
11855
11858
  ];
11859
+ console.log(
11860
+ "\u{1F680} ~ DLMM ~ getPositionsByUserAndLbPair ~ positions:",
11861
+ positions
11862
+ );
11856
11863
  if (!positions) {
11857
11864
  throw new Error("Error fetching positions");
11858
11865
  }
@@ -12992,21 +12999,11 @@ var DLMM = class {
12992
12999
  owner,
12993
13000
  position
12994
13001
  }) {
12995
- const preInstructions = [];
12996
- console.log(
12997
- position.positionData.feeX.toString(),
12998
- position.positionData.feeY.toString()
12999
- );
13000
- if (!position.positionData.feeX.isZero() || !position.positionData.feeY.isZero()) {
13001
- const claimIx = await this.createClaimSwapFeeMethod({ owner, position });
13002
- preInstructions.push(...claimIx.instructions);
13003
- console.log("\u{1F680} ~ DLMM ~ claimIx:", claimIx);
13004
- }
13005
13002
  const closePositionIx = await this.program.methods.closePosition2().accounts({
13006
13003
  rentReceiver: owner,
13007
13004
  position: position.publicKey,
13008
13005
  sender: owner
13009
- }).preInstructions(preInstructions).instruction();
13006
+ }).instruction();
13010
13007
  const setCUIx = await getEstimatedComputeUnitIxWithBuffer(
13011
13008
  this.program.provider.connection,
13012
13009
  [closePositionIx],