@meteora-ag/dlmm 1.1.3 → 1.1.4
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 +3 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9812,10 +9812,8 @@ var DLMM = class {
|
|
|
9812
9812
|
);
|
|
9813
9813
|
createPayerTokenIx && preInstructions.push(createPayerTokenIx);
|
|
9814
9814
|
const postInstructions = [];
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
this.tokenY.publicKey.toBase58()
|
|
9818
|
-
].includes(NATIVE_MINT2.toBase58())) {
|
|
9815
|
+
const shouldUnwrapSOL = removeLiquidityForY && this.tokenY.publicKey.equals(NATIVE_MINT2) || !removeLiquidityForY && this.tokenX.publicKey.equals(NATIVE_MINT2);
|
|
9816
|
+
if (shouldUnwrapSOL) {
|
|
9819
9817
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
9820
9818
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
9821
9819
|
}
|
|
@@ -9838,7 +9836,7 @@ var DLMM = class {
|
|
|
9838
9836
|
binArrayUpper,
|
|
9839
9837
|
sender: user,
|
|
9840
9838
|
tokenProgram: TOKEN_PROGRAM_ID2
|
|
9841
|
-
}).preInstructions(preInstructions).transaction();
|
|
9839
|
+
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
9842
9840
|
const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
|
|
9843
9841
|
return new Transaction({
|
|
9844
9842
|
blockhash,
|