@haven-fi/solauto-sdk 1.0.418 → 1.0.420

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.
@@ -211,14 +211,15 @@ async function sendJitoBundledTransactions(umi, connection, signer, txs, txType,
211
211
  simulationResults = await simulateJitoBundle(umi, builtTxs);
212
212
  }
213
213
  if (txType !== "only-simulate") {
214
+ const signers = [...builtTxs].map((tx) => getRequiredSigners(tx.message));
215
+ if (Array.from(new Set(signers.flatMap(x => x).filter(x => x.publicKey))).length > 1) {
216
+ (0, generalUtils_1.consoleLog)("Signers:", signers);
217
+ throw new Error("Unexpected error 301. Please retry.");
218
+ }
214
219
  onAwaitingSign?.();
215
- console.log("Signers expected:");
216
- (0, generalUtils_1.consoleLog)([...builtTxs].map((tx) => getRequiredSigners(tx.message)));
217
220
  builtTxs = await umiToVersionedTransactions(umi, latestBlockhash, signer, txs, true, feeEstimates, simulationResults
218
221
  ? simulationResults.map((x) => x.unitsConsumed * 1.15)
219
222
  : undefined);
220
- console.log("Signers:");
221
- (0, generalUtils_1.consoleLog)([...builtTxs].map((tx) => getRequiredSigners(tx.message)));
222
223
  const serializedTxs = builtTxs.map((x) => x.serialize());
223
224
  if (serializedTxs.find((x) => x.length > 1232)) {
224
225
  throw new Error("A transaction is too large");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.418",
3
+ "version": "1.0.420",
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",
@@ -345,10 +345,13 @@ export async function sendJitoBundledTransactions(
345
345
  }
346
346
 
347
347
  if (txType !== "only-simulate") {
348
- onAwaitingSign?.();
348
+ const signers = [...builtTxs].map((tx) => getRequiredSigners(tx.message));
349
+ if (Array.from(new Set(signers.flatMap(x => x).filter(x => x.publicKey))).length > 1) {
350
+ consoleLog("Signers:", signers);
351
+ throw new Error("Unexpected error 301. Please retry.");
352
+ }
349
353
 
350
- console.log("Signers expected:");
351
- consoleLog([...builtTxs].map((tx) => getRequiredSigners(tx.message)));
354
+ onAwaitingSign?.();
352
355
 
353
356
  builtTxs = await umiToVersionedTransactions(
354
357
  umi,
@@ -362,9 +365,6 @@ export async function sendJitoBundledTransactions(
362
365
  : undefined
363
366
  );
364
367
 
365
- console.log("Signers:");
366
- consoleLog([...builtTxs].map((tx) => getRequiredSigners(tx.message)));
367
-
368
368
  const serializedTxs = builtTxs.map((x) => x.serialize());
369
369
  if (serializedTxs.find((x) => x.length > 1232)) {
370
370
  throw new Error("A transaction is too large");