@meteora-ag/dlmm 1.0.4 → 1.0.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
@@ -7455,7 +7455,7 @@ var DLMM = class {
7455
7455
  pubkey
7456
7456
  };
7457
7457
  });
7458
- return await this.program.methods.swap(inAmount, minOutAmount).accounts({
7458
+ const swapTx = await this.program.methods.swap(inAmount, minOutAmount).accounts({
7459
7459
  lbPair,
7460
7460
  reserveX,
7461
7461
  reserveY,
@@ -7472,6 +7472,12 @@ var DLMM = class {
7472
7472
  oracle,
7473
7473
  hostFeeIn: null
7474
7474
  }).remainingAccounts(binArrays).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
7475
+ const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
7476
+ return new (0, _web3js.Transaction)({
7477
+ blockhash,
7478
+ lastValidBlockHeight,
7479
+ feePayer: user
7480
+ }).add(swapTx);
7475
7481
  }
7476
7482
  /**
7477
7483
  * The claimLMReward function is used to claim rewards for a specific position owned by a specific owner.