@lavarage/sdk 6.3.0 → 6.3.2
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 +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/index.ts +8 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2420,7 +2420,7 @@ function getTokenAccountOrCreateIfNotExists(lavarageProgram, ownerPublicKey, tok
|
|
|
2420
2420
|
return __async(this, null, function* () {
|
|
2421
2421
|
const associatedTokenAddress = getAssociatedTokenAddressSync(tokenAddress, ownerPublicKey, true, tokenProgram, ASSOCIATED_TOKEN_PROGRAM_ID);
|
|
2422
2422
|
try {
|
|
2423
|
-
const tokenAccount = yield getAccount(lavarageProgram.provider.connection, associatedTokenAddress, "finalized");
|
|
2423
|
+
const tokenAccount = yield getAccount(lavarageProgram.provider.connection, associatedTokenAddress, "finalized", tokenProgram);
|
|
2424
2424
|
return { account: tokenAccount, instruction: null };
|
|
2425
2425
|
} catch (error) {
|
|
2426
2426
|
if (error instanceof TokenAccountNotFoundError || error instanceof TokenInvalidAccountOwnerError) {
|
|
@@ -2674,12 +2674,12 @@ var openTradeV2 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
|
|
|
2674
2674
|
systemProgram: SystemProgram.programId,
|
|
2675
2675
|
clock: SYSVAR_CLOCK_PUBKEY,
|
|
2676
2676
|
randomAccountAsId: randomSeed.publicKey.toBase58(),
|
|
2677
|
-
feeTokenAccount: getAssociatedTokenAddressSync(quoteToken, new PublicKey("6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF")),
|
|
2677
|
+
feeTokenAccount: getAssociatedTokenAddressSync(quoteToken, new PublicKey("6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF"), true, quoteTokenProgram),
|
|
2678
2678
|
toTokenAccount: getAssociatedTokenAddressSync(quoteToken, lavarageProgram.provider.publicKey, true, quoteTokenProgram),
|
|
2679
|
-
tokenProgram,
|
|
2680
|
-
fromTokenAccount: getAssociatedTokenAddressSync(quoteToken, offer.account.nodeWallet, true,
|
|
2679
|
+
tokenProgram: quoteTokenProgram,
|
|
2680
|
+
fromTokenAccount: getAssociatedTokenAddressSync(quoteToken, offer.account.nodeWallet, true, quoteTokenProgram)
|
|
2681
2681
|
}).remainingAccounts(partnerFeeRecipient && partnerFeeMarkupAsPkey ? [{
|
|
2682
|
-
pubkey: partnerFeeRecipient,
|
|
2682
|
+
pubkey: getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient, false, quoteTokenProgram),
|
|
2683
2683
|
isSigner: false,
|
|
2684
2684
|
isWritable: true
|
|
2685
2685
|
}, {
|
|
@@ -2723,7 +2723,7 @@ var createTpDelegate = (lavarageProgram, position, tpPrice, tpTolerence, prioFee
|
|
|
2723
2723
|
delegatedAccount: position.publicKey,
|
|
2724
2724
|
systemProgram: SystemProgram.programId
|
|
2725
2725
|
}).remainingAccounts(partnerFeeRecipient ? [{
|
|
2726
|
-
pubkey: quoteToken.toBase58() == "So11111111111111111111111111111111111111112" ? partnerFeeRecipient : getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient,
|
|
2726
|
+
pubkey: quoteToken.toBase58() == "So11111111111111111111111111111111111111112" ? partnerFeeRecipient : getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient, false),
|
|
2727
2727
|
isSigner: false,
|
|
2728
2728
|
isWritable: true
|
|
2729
2729
|
}] : []).instruction();
|
|
@@ -2755,7 +2755,7 @@ var modifyTpDelegate = (lavarageProgram, position, tpPrice, tpTolerence, prioFee
|
|
|
2755
2755
|
delegatedAccount: position.publicKey,
|
|
2756
2756
|
systemProgram: SystemProgram.programId
|
|
2757
2757
|
}).remainingAccounts(partnerFeeRecipient ? [{
|
|
2758
|
-
pubkey: quoteToken.toBase58() == "So11111111111111111111111111111111111111112" ? partnerFeeRecipient : getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient,
|
|
2758
|
+
pubkey: quoteToken.toBase58() == "So11111111111111111111111111111111111111112" ? partnerFeeRecipient : getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient, false),
|
|
2759
2759
|
isSigner: false,
|
|
2760
2760
|
isWritable: true
|
|
2761
2761
|
}] : []).instruction();
|
|
@@ -3041,7 +3041,7 @@ var closeTradeV2 = (lavarageProgram, position, offer, jupInstruction, quoteToken
|
|
|
3041
3041
|
toTokenAccount: getAssociatedTokenAddressSync(quoteToken, pool.account.nodeWallet, true, quoteTokenProgram),
|
|
3042
3042
|
mint: quoteToken
|
|
3043
3043
|
}).remainingAccounts(partnerFeeRecipient && partnerFeeMarkupAsPkey ? [{
|
|
3044
|
-
pubkey: partnerFeeRecipient,
|
|
3044
|
+
pubkey: getAssociatedTokenAddressSync(quoteToken, partnerFeeRecipient, false, quoteTokenProgram),
|
|
3045
3045
|
isSigner: false,
|
|
3046
3046
|
isWritable: true
|
|
3047
3047
|
}, {
|