@meteora-ag/dlmm 1.1.2 → 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 +2 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,
|