@haven-fi/solauto-sdk 1.0.272 → 1.0.273
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,QAAQ,CAAkC;IAClD,OAAO,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;YA+BxB,qBAAqB;YAgDrB,cAAc;YAqCd,eAAe;CAkD9B"}
|
@@ -104,9 +104,11 @@ class TransactionSet {
|
|
104
104
|
const transactions = this.items
|
105
105
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
106
106
|
.map((x) => x.tx);
|
107
|
+
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
108
|
+
this.txHandler.log(lutInputs);
|
107
109
|
return (0, umi_1.transactionBuilder)()
|
108
110
|
.add(transactions)
|
109
|
-
.setAddressLookupTables(
|
111
|
+
.setAddressLookupTables(lutInputs);
|
110
112
|
}
|
111
113
|
lutAddresses() {
|
112
114
|
return Array.from(new Set(this.items.map((x) => x.lookupTableAddresses).flat()));
|
@@ -341,11 +343,11 @@ class TransactionsManager {
|
|
341
343
|
]);
|
342
344
|
if (newItemSets.length > 1) {
|
343
345
|
itemSets.splice(currentIndex, itemSets.length - currentIndex, ...newItemSets);
|
344
|
-
const startOfQueuedStatuses = this.statuses.findIndex(x => x.status === TransactionStatus.Queued);
|
346
|
+
const startOfQueuedStatuses = this.statuses.findIndex((x) => x.status === TransactionStatus.Queued);
|
345
347
|
this.statuses.splice(startOfQueuedStatuses, this.statuses.length - startOfQueuedStatuses, ...newItemSets.map((x, i) => ({
|
346
348
|
name: x.name(),
|
347
349
|
attemptNum: i === 0 ? attemptNum : 0,
|
348
|
-
status: TransactionStatus.Queued,
|
350
|
+
status: i === 0 ? TransactionStatus.Processing : TransactionStatus.Queued,
|
349
351
|
})));
|
350
352
|
}
|
351
353
|
return newItemSets[0];
|
package/package.json
CHANGED
@@ -159,11 +159,11 @@ class TransactionSet {
|
|
159
159
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
160
160
|
.map((x) => x.tx!);
|
161
161
|
|
162
|
+
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
163
|
+
this.txHandler.log(lutInputs);
|
162
164
|
return transactionBuilder()
|
163
165
|
.add(transactions)
|
164
|
-
.setAddressLookupTables(
|
165
|
-
await this.lookupTables.getLutInputs(this.lutAddresses())
|
166
|
-
);
|
166
|
+
.setAddressLookupTables(lutInputs);
|
167
167
|
}
|
168
168
|
|
169
169
|
lutAddresses(): string[] {
|
@@ -528,14 +528,17 @@ export class TransactionsManager {
|
|
528
528
|
itemSets.length - currentIndex,
|
529
529
|
...newItemSets
|
530
530
|
);
|
531
|
-
const startOfQueuedStatuses = this.statuses.findIndex(
|
531
|
+
const startOfQueuedStatuses = this.statuses.findIndex(
|
532
|
+
(x) => x.status === TransactionStatus.Queued
|
533
|
+
);
|
532
534
|
this.statuses.splice(
|
533
535
|
startOfQueuedStatuses,
|
534
536
|
this.statuses.length - startOfQueuedStatuses,
|
535
537
|
...newItemSets.map((x, i) => ({
|
536
538
|
name: x.name(),
|
537
539
|
attemptNum: i === 0 ? attemptNum : 0,
|
538
|
-
status:
|
540
|
+
status:
|
541
|
+
i === 0 ? TransactionStatus.Processing : TransactionStatus.Queued,
|
539
542
|
}))
|
540
543
|
);
|
541
544
|
}
|