@meteora-ag/dlmm 1.0.54 → 1.0.55-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
@@ -9696,10 +9696,7 @@ var DLMM = class {
9696
9696
  );
9697
9697
  createPayerTokenIx && preInstructions.push(createPayerTokenIx);
9698
9698
  const postInstructions = [];
9699
- if ([
9700
- this.tokenX.publicKey.toBase58(),
9701
- this.tokenY.publicKey.toBase58()
9702
- ].includes(_spltoken.NATIVE_MINT.toBase58())) {
9699
+ if (removeLiquidityForY && this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) || !removeLiquidityForY && this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT)) {
9703
9700
  const closeWrappedSOLIx = await unwrapSOLInstruction(user);
9704
9701
  closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
9705
9702
  }
@@ -9722,7 +9719,7 @@ var DLMM = class {
9722
9719
  binArrayUpper,
9723
9720
  sender: user,
9724
9721
  tokenProgram: _spltoken.TOKEN_PROGRAM_ID
9725
- }).preInstructions(preInstructions).transaction();
9722
+ }).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
9726
9723
  const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
9727
9724
  return new (0, _web3js.Transaction)({
9728
9725
  blockhash,