@meteora-ag/dlmm 1.6.1 → 1.7.0-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.mjs CHANGED
@@ -16785,6 +16785,7 @@ var DLMM = class {
16785
16785
  * - `toBinId`: The ID of the ending bin to remove liquidity from. Must within position range.
16786
16786
  * - `liquiditiesBpsToRemove`: An array of numbers (percentage) that represent the liquidity to remove from each bin.
16787
16787
  * - `shouldClaimAndClose`: A boolean flag that indicates whether to claim rewards and close the position.
16788
+ * - `skipUnwrapSOL`: A boolean flag that indicates whether to skip unwrapping SOL. Enable this when using zap-sdk to ensure accuracy in SOL zap out amount when SOL is in token
16788
16789
  * @returns {Promise<Transaction[]>}
16789
16790
  */
16790
16791
  async removeLiquidity({
@@ -16793,7 +16794,8 @@ var DLMM = class {
16793
16794
  fromBinId,
16794
16795
  toBinId,
16795
16796
  bps,
16796
- shouldClaimAndClose = false
16797
+ shouldClaimAndClose = false,
16798
+ skipUnwrapSOL = false
16797
16799
  }) {
16798
16800
  const positionAccount = await this.program.provider.connection.getAccountInfo(position);
16799
16801
  const positionState = wrapPosition(this.program, position, positionAccount);
@@ -16950,7 +16952,7 @@ var DLMM = class {
16950
16952
  if ([
16951
16953
  this.tokenX.publicKey.toBase58(),
16952
16954
  this.tokenY.publicKey.toBase58()
16953
- ].includes(NATIVE_MINT2.toBase58())) {
16955
+ ].includes(NATIVE_MINT2.toBase58()) && !skipUnwrapSOL) {
16954
16956
  const closeWrappedSOLIx = await unwrapSOLInstruction(user);
16955
16957
  closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
16956
16958
  }