@haven-fi/solauto-sdk 1.0.243 → 1.0.244
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;AAI7D,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAqCD,qBAAa,eAAe;IAKjB,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM;IAPtB,oBAAoB,EAAG,MAAM,EAAE,CAAC;IAChC,EAAE,CAAC,EAAE,kBAAkB,CAAC;gBAGf,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,EACxC,IAAI,CAAC,EAAE,MAAM,YAAA;IAGhB,UAAU;IAIV,OAAO,CAAC,UAAU,EAAE,MAAM;IAMhC,cAAc,IAAI,MAAM,EAAE;CAY3B;AAgFD,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,CAAC,EAAE,MAAM,CAAC;IAClB,o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,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;IAMd,UAAU,CACrB,YAAY,EAAE,eAAe,EAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IAyEzB,IAAI,CACf,KAAK,EAAE,eAAe,EAAE,EACxB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,0BAA0B,CAAC;YA6BxB,qBAAqB;YAiDrB,cAAc;YAyBd,eAAe;CAkD9B"}
|
@@ -250,16 +250,14 @@ class TransactionsManager {
|
|
250
250
|
for (const item of items) {
|
251
251
|
await item.initialize();
|
252
252
|
}
|
253
|
-
let choresBeforeName;
|
254
253
|
const [choresBefore, choresAfter] = await (0, transactionUtils_1.getTransactionChores)(client, (0, umi_1.transactionBuilder)().add(items
|
255
254
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
256
255
|
.map((x) => x.tx)));
|
257
256
|
if (updateLookupTable && !updateLookupTable.needsToBeIsolated) {
|
258
257
|
choresBefore.prepend(updateLookupTable.updateLutTx);
|
259
|
-
choresBeforeName = "update lookup table";
|
260
258
|
}
|
261
259
|
if (choresBefore.getInstructions().length > 0) {
|
262
|
-
const chore = new TransactionItem(async () => ({ tx: choresBefore
|
260
|
+
const chore = new TransactionItem(async () => ({ tx: choresBefore }));
|
263
261
|
await chore.initialize();
|
264
262
|
items.unshift(chore);
|
265
263
|
this.txHandler.log("Chores before: ", choresBefore.getInstructions().length);
|
package/package.json
CHANGED
@@ -372,7 +372,6 @@ export class TransactionsManager {
|
|
372
372
|
await item.initialize();
|
373
373
|
}
|
374
374
|
|
375
|
-
let choresBeforeName: string | undefined;
|
376
375
|
const [choresBefore, choresAfter] = await getTransactionChores(
|
377
376
|
client,
|
378
377
|
transactionBuilder().add(
|
@@ -383,10 +382,9 @@ export class TransactionsManager {
|
|
383
382
|
);
|
384
383
|
if (updateLookupTable && !updateLookupTable.needsToBeIsolated) {
|
385
384
|
choresBefore.prepend(updateLookupTable.updateLutTx);
|
386
|
-
choresBeforeName = "update lookup table";
|
387
385
|
}
|
388
386
|
if (choresBefore.getInstructions().length > 0) {
|
389
|
-
const chore = new TransactionItem(async () => ({ tx: choresBefore
|
387
|
+
const chore = new TransactionItem(async () => ({ tx: choresBefore }));
|
390
388
|
await chore.initialize();
|
391
389
|
items.unshift(chore);
|
392
390
|
this.txHandler.log(
|
@@ -490,7 +488,7 @@ export class TransactionsManager {
|
|
490
488
|
this.updateStatus(
|
491
489
|
itemSet.name(),
|
492
490
|
TransactionStatus.Failed,
|
493
|
-
this.retries
|
491
|
+
this.retries
|
494
492
|
);
|
495
493
|
}
|
496
494
|
throw e;
|
@@ -504,17 +502,21 @@ export class TransactionsManager {
|
|
504
502
|
): Promise<TransactionSet | undefined> {
|
505
503
|
const itemSet = itemSets[currentIndex];
|
506
504
|
await itemSet.refetchAll(attemptNum);
|
507
|
-
|
505
|
+
|
508
506
|
const newItemSets = await this.assembleTransactionSets([
|
509
507
|
...itemSet.items,
|
510
508
|
...itemSets.slice(currentIndex + 1).flatMap((set) => set.items),
|
511
509
|
]);
|
512
|
-
|
510
|
+
|
513
511
|
if (newItemSets.length > 1) {
|
514
|
-
itemSets.splice(
|
512
|
+
itemSets.splice(
|
513
|
+
currentIndex + 1,
|
514
|
+
itemSets.length - currentIndex - 1,
|
515
|
+
...newItemSets.slice(1)
|
516
|
+
);
|
515
517
|
this.updateStatusForSets(newItemSets.slice(1));
|
516
518
|
}
|
517
|
-
|
519
|
+
|
518
520
|
return newItemSets[0];
|
519
521
|
}
|
520
522
|
|