@meteora-ag/dlmm 1.1.1 → 1.1.3-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
@@ -9767,10 +9767,7 @@ var DLMM = class {
9767
9767
  );
9768
9768
  createPayerTokenIx && preInstructions.push(createPayerTokenIx);
9769
9769
  const postInstructions = [];
9770
- if ([
9771
- this.tokenX.publicKey.toBase58(),
9772
- this.tokenY.publicKey.toBase58()
9773
- ].includes(_spltoken.NATIVE_MINT.toBase58())) {
9770
+ if (removeLiquidityForY && this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) || !removeLiquidityForY && this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT)) {
9774
9771
  const closeWrappedSOLIx = await unwrapSOLInstruction(user);
9775
9772
  closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
9776
9773
  }
@@ -9793,7 +9790,7 @@ var DLMM = class {
9793
9790
  binArrayUpper,
9794
9791
  sender: user,
9795
9792
  tokenProgram: _spltoken.TOKEN_PROGRAM_ID
9796
- }).preInstructions(preInstructions).transaction();
9793
+ }).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
9797
9794
  const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
9798
9795
  return new (0, _web3js.Transaction)({
9799
9796
  blockhash,
@@ -11148,7 +11145,7 @@ var DLMM = class {
11148
11145
  const preActivationSwapPoint = this.lbPair.activationPoint.sub(
11149
11146
  this.lbPair.preActivationDuration
11150
11147
  );
11151
- const activationPoint = !this.lbPair.whitelistedWallet.equals(_web3js.PublicKey.default) && this.lbPair.whitelistedWallet.equals(swapInitiator) ? preActivationSwapPoint : this.lbPair.activationPoint;
11148
+ const activationPoint = !this.lbPair.preActivationSwapAddress.equals(_web3js.PublicKey.default) && this.lbPair.preActivationSwapAddress.equals(swapInitiator) ? preActivationSwapPoint : this.lbPair.activationPoint;
11152
11149
  if (currentPoint < activationPoint) {
11153
11150
  return true;
11154
11151
  }