@haven-fi/solauto-sdk 1.0.259 → 1.0.261

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.
@@ -340,12 +340,12 @@ class TransactionsManager {
340
340
  ...itemSets.slice(currentIndex + 1).flatMap((set) => set.items),
341
341
  ]);
342
342
  if (newItemSets.length > 1) {
343
- this.statuses.splice(this.statusesStartIdx + 1, itemSets.length - 1, ...newItemSets.map((x, i) => ({
343
+ itemSets.splice(currentIndex + 1, itemSets.length - currentIndex - 1, ...newItemSets.slice(1));
344
+ this.statuses.splice(this.statusesStartIdx + currentIndex + 1, itemSets.length - 1, ...newItemSets.map((x, i) => ({
344
345
  name: x.name(),
346
+ attemptNum: 0,
345
347
  status: TransactionStatus.Queued,
346
- attemptNum: i === 0 ? attemptNum : 0,
347
348
  })));
348
- itemSets.splice(currentIndex + 1, itemSets.length - currentIndex - 1, ...newItemSets.slice(1));
349
349
  this.updateStatusForSets(newItemSets.slice(1));
350
350
  }
351
351
  return newItemSets[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.259",
3
+ "version": "1.0.261",
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",
@@ -526,20 +526,20 @@ export class TransactionsManager {
526
526
  ]);
527
527
 
528
528
  if (newItemSets.length > 1) {
529
+ itemSets.splice(
530
+ currentIndex + 1,
531
+ itemSets.length - currentIndex - 1,
532
+ ...newItemSets.slice(1)
533
+ );
529
534
  this.statuses.splice(
530
- this.statusesStartIdx + 1,
535
+ this.statusesStartIdx + currentIndex + 1,
531
536
  itemSets.length - 1,
532
537
  ...newItemSets.map((x, i) => ({
533
538
  name: x.name(),
539
+ attemptNum: 0,
534
540
  status: TransactionStatus.Queued,
535
- attemptNum: i === 0 ? attemptNum : 0,
536
541
  }))
537
542
  );
538
- itemSets.splice(
539
- currentIndex + 1,
540
- itemSets.length - currentIndex - 1,
541
- ...newItemSets.slice(1)
542
- );
543
543
  this.updateStatusForSets(newItemSets.slice(1));
544
544
  }
545
545