@haven-fi/solauto-sdk 1.0.273 → 1.0.275
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionsManager.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,EACL,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAElB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAa,MAAM,YAAY,CAAC;AAO7D,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAqCD,qBAAa,eAAe;IAMjB,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM;IARtB,oBAAoB,EAAG,MAAM,EAAE,CAAC;IAChC,EAAE,CAAC,EAAE,kBAAkB,CAAC;IACjB,WAAW,EAAE,OAAO,CAAS;gBAG3B,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,EACxC,IAAI,CAAC,EAAE,MAAM,YAAA;IAGhB,UAAU;IAKV,OAAO,CAAC,UAAU,EAAE,MAAM;IAMhC,cAAc,IAAI,MAAM,EAAE;CAY3B;AAmFD,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,C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,CAAC,YAAY,CAAe;gBAGzB,SAAS,EAAE,aAAa,GAAG,oBAAoB,EAC/C,cAAc,CAAC,GAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,IAAI,aAAA,EAC/D,MAAM,CAAC,EAAE,kBAAkB,YAAA,EAC3B,kBAAkB,GAAE,kBAA2C,EAC/D,aAAa,CAAC,EAAE,aAAa,YAAA,EAC7B,OAAO,GAAE,MAAU,EACnB,UAAU,GAAE,MAAY;YAQpB,uBAAuB;IAwCrC,OAAO,CAAC,YAAY;YA8CN,aAAa;IAoB3B,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,mBAAmB;YAMb,SAAS;IAgBV,UAAU,CACrB,YAAY,EAAE,eAAe,EAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IA+DzB,IAAI,CACf,KAAK,EAAE,eAAe,EAAE,GACvB,OAAO,CAAC,0BAA0B,CAAC;YAsCxB,qBAAqB;YAuDrB,cAAc;YAqCd,eAAe;CAoD9B"}
|
@@ -298,6 +298,12 @@ class TransactionsManager {
|
|
298
298
|
const itemSets = await this.assembleTransactionSets(items);
|
299
299
|
this.updateStatusForSets(itemSets);
|
300
300
|
this.txHandler.log("Initial item sets:", itemSets.length);
|
301
|
+
for (const itemSet of itemSets) {
|
302
|
+
const programs = (await itemSet.getSingleTransaction())
|
303
|
+
.getInstructions()
|
304
|
+
.map((x) => x.programId);
|
305
|
+
this.txHandler.log(programs.map((x) => x.toString()));
|
306
|
+
}
|
301
307
|
if (this.txType === "only-simulate" && itemSets.length > 1) {
|
302
308
|
this.txHandler.log("Only simulate and more than 1 transaction. Skipping...");
|
303
309
|
return [];
|
@@ -329,7 +335,7 @@ class TransactionsManager {
|
|
329
335
|
}
|
330
336
|
}, this.retries, this.retryDelay, this.errorsToThrow).catch((e) => {
|
331
337
|
if (itemSet) {
|
332
|
-
this.updateStatus(itemSet.name(), TransactionStatus.Failed, num);
|
338
|
+
this.updateStatus(itemSet.name(), TransactionStatus.Failed, num, undefined, undefined, e.message);
|
333
339
|
}
|
334
340
|
throw e;
|
335
341
|
});
|
@@ -363,7 +369,9 @@ class TransactionsManager {
|
|
363
369
|
const errorString = `${errorDetails.errorName ?? "Unknown error"}: ${errorDetails.errorInfo ?? "unknown"}`;
|
364
370
|
this.updateStatus(txName, errorDetails.canBeIgnored
|
365
371
|
? TransactionStatus.Skipped
|
366
|
-
: TransactionStatus.Failed, attemptNum, undefined, undefined,
|
372
|
+
: TransactionStatus.Failed, attemptNum, undefined, undefined, errorDetails.errorName || errorDetails.errorInfo
|
373
|
+
? errorString
|
374
|
+
: e.message);
|
367
375
|
this.txHandler.log(errorString);
|
368
376
|
if (!errorDetails.canBeIgnored) {
|
369
377
|
throw e;
|
package/package.json
CHANGED
@@ -445,6 +445,13 @@ export class TransactionsManager {
|
|
445
445
|
this.updateStatusForSets(itemSets);
|
446
446
|
this.txHandler.log("Initial item sets:", itemSets.length);
|
447
447
|
|
448
|
+
for (const itemSet of itemSets) {
|
449
|
+
const programs = (await itemSet.getSingleTransaction())
|
450
|
+
.getInstructions()
|
451
|
+
.map((x) => x.programId);
|
452
|
+
this.txHandler.log(programs.map((x) => x.toString()));
|
453
|
+
}
|
454
|
+
|
448
455
|
if (this.txType === "only-simulate" && itemSets.length > 1) {
|
449
456
|
this.txHandler.log(
|
450
457
|
"Only simulate and more than 1 transaction. Skipping..."
|
@@ -501,9 +508,16 @@ export class TransactionsManager {
|
|
501
508
|
this.retries,
|
502
509
|
this.retryDelay,
|
503
510
|
this.errorsToThrow
|
504
|
-
).catch((e) => {
|
511
|
+
).catch((e: Error) => {
|
505
512
|
if (itemSet) {
|
506
|
-
this.updateStatus(
|
513
|
+
this.updateStatus(
|
514
|
+
itemSet.name(),
|
515
|
+
TransactionStatus.Failed,
|
516
|
+
num,
|
517
|
+
undefined,
|
518
|
+
undefined,
|
519
|
+
e.message
|
520
|
+
);
|
507
521
|
}
|
508
522
|
throw e;
|
509
523
|
});
|
@@ -587,7 +601,9 @@ export class TransactionsManager {
|
|
587
601
|
attemptNum,
|
588
602
|
undefined,
|
589
603
|
undefined,
|
590
|
-
|
604
|
+
errorDetails.errorName || errorDetails.errorInfo
|
605
|
+
? errorString
|
606
|
+
: e.message
|
591
607
|
);
|
592
608
|
this.txHandler.log(errorString);
|
593
609
|
|