@lavarage/sdk 6.1.4 → 6.1.9

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 CHANGED
@@ -2612,11 +2612,7 @@ var openTradeV1 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
2612
2612
  clock: import_web3.SYSVAR_CLOCK_PUBKEY,
2613
2613
  randomAccountAsId: randomSeed.publicKey.toBase58(),
2614
2614
  feeReceipient: "6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF"
2615
- }).remainingAccounts(partnerFeeRecipient ? [{
2616
- pubkey: partnerFeeRecipient,
2617
- isSigner: false,
2618
- isWritable: true
2619
- }] : []).instruction();
2615
+ }).instruction();
2620
2616
  const openAddCollateralInstruction = yield lavarageProgram.methods.tradingOpenAddCollateral(offer.account.interestRate).accountsStrict({
2621
2617
  tradingPool: offer.publicKey,
2622
2618
  trader: lavarageProgram.provider.publicKey,
@@ -2703,11 +2699,7 @@ var openTradeV2 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
2703
2699
  toTokenAccount: (0, import_spl_token.getAssociatedTokenAddressSync)(quoteToken, lavarageProgram.provider.publicKey, true, quoteTokenProgram),
2704
2700
  tokenProgram,
2705
2701
  fromTokenAccount: (0, import_spl_token.getAssociatedTokenAddressSync)(quoteToken, offer.account.nodeWallet, true, tokenProgram)
2706
- }).remainingAccounts(partnerFeeRecipient ? [{
2707
- pubkey: partnerFeeRecipient,
2708
- isSigner: false,
2709
- isWritable: true
2710
- }] : []).instruction();
2702
+ }).instruction();
2711
2703
  const openAddCollateralInstruction = yield lavarageProgram.methods.tradingOpenAddCollateral(offer.account.interestRate).accountsStrict({
2712
2704
  tradingPool: offer.publicKey,
2713
2705
  trader: lavarageProgram.provider.publicKey,
@@ -2925,11 +2917,7 @@ var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFee
2925
2917
  clock: import_web3.SYSVAR_CLOCK_PUBKEY,
2926
2918
  randomAccountAsId: position.account.seed,
2927
2919
  feeReceipient: "6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF"
2928
- }).remainingAccounts(partnerFeeRecipient ? [{
2929
- pubkey: partnerFeeRecipient,
2930
- isSigner: false,
2931
- isWritable: true
2932
- }] : []).instruction();
2920
+ }).instruction();
2933
2921
  } else {
2934
2922
  repaySolIx = yield lavarageProgram.methods.tradingCloseRepaySol(new import_anchor.BN(jupInstruction.quoteResponse.outAmount), new import_anchor.BN(9998)).accountsStrict({
2935
2923
  nodeWallet: pool.account.nodeWallet,
@@ -2940,11 +2928,7 @@ var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFee
2940
2928
  clock: import_web3.SYSVAR_CLOCK_PUBKEY,
2941
2929
  randomAccountAsId: position.account.seed,
2942
2930
  feeReceipient: "6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF"
2943
- }).remainingAccounts(partnerFeeRecipient ? [{
2944
- pubkey: partnerFeeRecipient,
2945
- isSigner: false,
2946
- isWritable: true
2947
- }] : []).instruction();
2931
+ }).instruction();
2948
2932
  const { setupInstructions, swapInstruction: swapInstructionPayload, cleanupInstruction, addressLookupTableAddresses } = jupiterSellIx;
2949
2933
  jupiterIxs = [
2950
2934
  ...setupInstructions.map(deserializeInstruction),
@@ -3044,11 +3028,7 @@ var closeTradeV2 = (lavarageProgram, position, offer, jupInstruction, quoteToken
3044
3028
  tokenProgram: quoteTokenProgram,
3045
3029
  toTokenAccount: (0, import_spl_token.getAssociatedTokenAddressSync)(quoteToken, pool.account.nodeWallet, true, quoteTokenProgram),
3046
3030
  mint: quoteToken
3047
- }).remainingAccounts(partnerFeeRecipient ? [{
3048
- pubkey: partnerFeeRecipient,
3049
- isSigner: false,
3050
- isWritable: true
3051
- }] : []).instruction();
3031
+ }).instruction();
3052
3032
  } else {
3053
3033
  repaySolIx = yield lavarageProgram.methods.tradingCloseRepaySol(new import_anchor.BN(jupInstruction.quoteResponse.outAmount), new import_anchor.BN(9998)).accountsStrict({
3054
3034
  nodeWallet: pool.account.nodeWallet,
@@ -3063,11 +3043,7 @@ var closeTradeV2 = (lavarageProgram, position, offer, jupInstruction, quoteToken
3063
3043
  tokenProgram: quoteTokenProgram,
3064
3044
  toTokenAccount: (0, import_spl_token.getAssociatedTokenAddressSync)(quoteToken, pool.account.nodeWallet, true, quoteTokenProgram),
3065
3045
  mint: quoteToken
3066
- }).remainingAccounts(partnerFeeRecipient ? [{
3067
- pubkey: partnerFeeRecipient,
3068
- isSigner: false,
3069
- isWritable: true
3070
- }] : []).instruction();
3046
+ }).instruction();
3071
3047
  const { setupInstructions, swapInstruction: swapInstructionPayload, cleanupInstruction, addressLookupTableAddresses } = jupiterSellIx;
3072
3048
  jupiterIxs = [
3073
3049
  ...setupInstructions.filter((i) => !!i).map(deserializeInstruction),