@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.
package/dist/utils/jitoUtils.js
CHANGED
@@ -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
|
-
|
216
|
-
|
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 ?
|
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
package/src/utils/jitoUtils.ts
CHANGED
@@ -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
|
-
|
347
|
-
|
348
|
-
|
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
|
}
|