@meteora-ag/cp-amm-sdk 1.0.1-rc.24 → 1.0.1-rc.25
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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8064,6 +8064,9 @@ var CpAmm = class {
|
|
|
8064
8064
|
referralTokenAccount
|
|
8065
8065
|
} = params;
|
|
8066
8066
|
const poolAuthority = derivePoolAuthority(this._program.programId);
|
|
8067
|
+
const [inputTokenProgram, outputTokenProgram] = inputTokenMint.equals(
|
|
8068
|
+
tokenAMint
|
|
8069
|
+
) ? [tokenAProgram, tokenBProgram] : [tokenBProgram, tokenAProgram];
|
|
8067
8070
|
const preInstructions = [];
|
|
8068
8071
|
const [
|
|
8069
8072
|
{ ataPubkey: inputTokenAccount, ix: createInputTokenAccountIx },
|
|
@@ -8075,7 +8078,7 @@ var CpAmm = class {
|
|
|
8075
8078
|
payer,
|
|
8076
8079
|
payer,
|
|
8077
8080
|
true,
|
|
8078
|
-
|
|
8081
|
+
inputTokenProgram
|
|
8079
8082
|
),
|
|
8080
8083
|
getOrCreateATAInstruction(
|
|
8081
8084
|
this._program.provider.connection,
|
|
@@ -8083,7 +8086,7 @@ var CpAmm = class {
|
|
|
8083
8086
|
payer,
|
|
8084
8087
|
payer,
|
|
8085
8088
|
true,
|
|
8086
|
-
|
|
8089
|
+
outputTokenProgram
|
|
8087
8090
|
)
|
|
8088
8091
|
]);
|
|
8089
8092
|
createInputTokenAccountIx && preInstructions.push(createInputTokenAccountIx);
|