@haven-fi/solauto-sdk 1.0.422 → 1.0.424

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.
@@ -212,8 +212,8 @@ async function sendJitoBundledTransactions(umi, connection, signer, txs, txType,
212
212
  }
213
213
  if (txType !== "only-simulate") {
214
214
  const signers = [...builtTxs].map((tx) => getRequiredSigners(tx.message));
215
- if (Array.from(new Set(signers.flatMap((x) => x).filter((x) => x.publicKey)))
216
- .length > 1) {
215
+ const uniqueSigners = Array.from(new Set(signers.flatMap((x) => x).map((x) => x.publicKey)));
216
+ if (uniqueSigners.length > 1) {
217
217
  (0, generalUtils_1.consoleLog)("Signers:", signers);
218
218
  throw new Error("Unexpected error 301. Please retry.");
219
219
  }
@@ -35,7 +35,7 @@ async function getJupSwapTransaction(signer, swapDetails, attemptNum) {
35
35
  ? "ExactIn"
36
36
  : undefined,
37
37
  slippageBps: memecoinSwap ? 500 : 200,
38
- maxAccounts: !swapDetails.exactOut ? 50 : undefined,
38
+ maxAccounts: !swapDetails.exactOut ? 45 : undefined,
39
39
  }), 4, 200);
40
40
  const priceImpactBps = Math.round((0, numberUtils_1.toBps)(parseFloat(quoteResponse.priceImpactPct))) + 1;
41
41
  const finalPriceSlippageBps = Math.round(Math.max(50, quoteResponse.slippageBps, priceImpactBps) *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.422",
3
+ "version": "1.0.424",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -343,10 +343,10 @@ export async function sendJitoBundledTransactions(
343
343
 
344
344
  if (txType !== "only-simulate") {
345
345
  const signers = [...builtTxs].map((tx) => getRequiredSigners(tx.message));
346
- if (
347
- Array.from(new Set(signers.flatMap((x) => x).filter((x) => x.publicKey)))
348
- .length > 1
349
- ) {
346
+ const uniqueSigners = Array.from(
347
+ new Set(signers.flatMap((x) => x).map((x) => x.publicKey))
348
+ );
349
+ if (uniqueSigners.length > 1) {
350
350
  consoleLog("Signers:", signers);
351
351
  throw new Error("Unexpected error 301. Please retry.");
352
352
  }
@@ -71,7 +71,7 @@ export async function getJupSwapTransaction(
71
71
  ? "ExactIn"
72
72
  : undefined,
73
73
  slippageBps: memecoinSwap ? 500 : 200,
74
- maxAccounts: !swapDetails.exactOut ? 50 : undefined,
74
+ maxAccounts: !swapDetails.exactOut ? 45 : undefined,
75
75
  }),
76
76
  4,
77
77
  200