flash-sdk 9.0.0-alpha.11 → 9.0.0-alpha.12

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.
@@ -2686,7 +2686,7 @@ var PerpetualsClient = (function () {
2686
2686
  args_1[_i - 9] = arguments[_i];
2687
2687
  }
2688
2688
  return __awaiter(_this, __spreadArray([targetTokenSymbol_1, collateralTokenSymbol_1, userInputTokenSymbol_1, amountIn_1, priceWithSlippage_1, sizeAmount_1, side_1, poolConfig_1, privilege_1], args_1, true), void 0, function (targetTokenSymbol, collateralTokenSymbol, userInputTokenSymbol, amountIn, priceWithSlippage, sizeAmount, side, poolConfig, privilege, tokenStakeAccount, userReferralAccount, skipBalanceChecks, ephemeralSignerPubkey) {
2689
- var publicKey, userInputCustodyConfig, collateralCustodyConfig, targetCustodyConfig, marketAccount, positionAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, targetToken, userInputTokenAccount, userInputToken, lamports, unWrappedSolBalance, _a, userOutputTokenAccount, tokenAccountBalance, _b, userOutputTokenAccount, rebateMintAccount, inx, err_3;
2689
+ var publicKey, userInputCustodyConfig, collateralCustodyConfig, targetCustodyConfig, marketAccount, positionAccount, wrappedSolAccount, preInstructions, instructions, postInstructions, additionalSigners, targetToken, userInputTokenAccount, userInputToken, lamports, unWrappedSolBalance, _a, userOutputTokenAccount, tokenAccountBalance, _b, userOutputTokenAccount, inx, err_3;
2690
2690
  if (tokenStakeAccount === void 0) { tokenStakeAccount = web3_js_1.PublicKey.default; }
2691
2691
  if (userReferralAccount === void 0) { userReferralAccount = web3_js_1.PublicKey.default; }
2692
2692
  if (skipBalanceChecks === void 0) { skipBalanceChecks = false; }
@@ -2782,14 +2782,7 @@ var PerpetualsClient = (function () {
2782
2782
  }
2783
2783
  _c.label = 10;
2784
2784
  case 10:
2785
- rebateMintAccount = {
2786
- pubkey: collateralCustodyConfig.mintKey,
2787
- isSigner: false,
2788
- isWritable: false
2789
- };
2790
- _c.label = 11;
2791
- case 11:
2792
- _c.trys.push([11, 13, , 14]);
2785
+ _c.trys.push([10, 12, , 13]);
2793
2786
  return [4, this.program.methods
2794
2787
  .swapAndOpen({
2795
2788
  amountIn: amountIn,
@@ -2825,15 +2818,15 @@ var PerpetualsClient = (function () {
2825
2818
  })
2826
2819
  .remainingAccounts(__spreadArray([], (0, getReferralAccounts_1.getReferralAccounts)(tokenStakeAccount, userReferralAccount, privilege), true))
2827
2820
  .instruction()];
2828
- case 12:
2821
+ case 11:
2829
2822
  inx = _c.sent();
2830
2823
  instructions.push(inx);
2831
- return [3, 14];
2832
- case 13:
2824
+ return [3, 13];
2825
+ case 12:
2833
2826
  err_3 = _c.sent();
2834
2827
  console.error("perpClient SwapAndOpen error:: ", err_3);
2835
2828
  throw err_3;
2836
- case 14: return [2, {
2829
+ case 13: return [2, {
2837
2830
  instructions: __spreadArray(__spreadArray(__spreadArray([], preInstructions, true), instructions, true), postInstructions, true),
2838
2831
  additionalSigners: additionalSigners
2839
2832
  }];