@meteora-ag/dlmm 1.1.2 → 1.1.3-rc.1

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
@@ -9766,11 +9766,10 @@ var DLMM = class {
9766
9766
  user
9767
9767
  );
9768
9768
  createPayerTokenIx && preInstructions.push(createPayerTokenIx);
9769
+ const reserve = removeLiquidityForY ? reserveY : reserveX;
9770
+ const tokenMint = removeLiquidityForY ? tokenYMint : tokenXMint;
9769
9771
  const postInstructions = [];
9770
- if ([
9771
- this.tokenX.publicKey.toBase58(),
9772
- this.tokenY.publicKey.toBase58()
9773
- ].includes(_spltoken.NATIVE_MINT.toBase58())) {
9772
+ if (tokenMint.equals(_spltoken.NATIVE_MINT)) {
9774
9773
  const closeWrappedSOLIx = await unwrapSOLInstruction(user);
9775
9774
  closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
9776
9775
  }
@@ -9780,8 +9779,6 @@ var DLMM = class {
9780
9779
  const maxBinArrayIndex = binIdToBinArrayIndex(new (0, _anchor.BN)(maxBinId));
9781
9780
  const useExtension = isOverflowDefaultBinArrayBitmap(minBinArrayIndex) || isOverflowDefaultBinArrayBitmap(maxBinArrayIndex);
9782
9781
  const binArrayBitmapExtension = useExtension ? deriveBinArrayBitmapExtension(this.pubkey, this.program.programId)[0] : null;
9783
- const reserve = removeLiquidityForY ? reserveY : reserveX;
9784
- const tokenMint = removeLiquidityForY ? tokenYMint : tokenXMint;
9785
9782
  const removeLiquiditySingleSideTx = await this.program.methods.removeLiquiditySingleSide().accounts({
9786
9783
  position,
9787
9784
  lbPair,
@@ -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,