@haven-fi/solauto-sdk 1.0.747 → 1.0.748

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.
@@ -1 +1 @@
1
- {"version":3,"file":"clientTransactionsManager.d.ts","sourceRoot":"","sources":["../../../../src/services/transactions/manager/clientTransactionsManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,aAAa,CAAC;YACjE,SAAS;YAmBT,mBAAmB;YA4BnB,WAAW;IA4CZ,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE;CAiClD"}
1
+ {"version":3,"file":"clientTransactionsManager.d.ts","sourceRoot":"","sources":["../../../../src/services/transactions/manager/clientTransactionsManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,aAAa,CAAC;YACjE,SAAS;YAmBT,mBAAmB;YA4BnB,WAAW;IA4CZ,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE;CAkClD"}
@@ -53,7 +53,8 @@ class ClientTransactionsManager extends transactionsManager_1.TransactionsManage
53
53
  const items = [...transactions];
54
54
  const client = this.txHandler;
55
55
  const updateLut = await client.updateLookupTable();
56
- if (updateLut && (updateLut?.new || updateLut.accountsToAdd.length > 4)) {
56
+ const updateLutInSepTx = updateLut?.new || (updateLut?.accountsToAdd ?? []).length > 4;
57
+ if (updateLut && updateLutInSepTx) {
57
58
  await this.updateLut(updateLut.tx, updateLut.new);
58
59
  }
59
60
  this.lookupTables.defaultLuts = client.defaultLookupTables();
@@ -61,7 +62,7 @@ class ClientTransactionsManager extends transactionsManager_1.TransactionsManage
61
62
  for (const item of items) {
62
63
  await item.initialize();
63
64
  }
64
- await this.addChoreTxs(items, updateLut && !updateLut?.new ? updateLut.tx : undefined);
65
+ await this.addChoreTxs(items, updateLut && !updateLutInSepTx ? updateLut.tx : undefined);
65
66
  const result = await super.send(items).catch((e) => {
66
67
  client.resetLiveTxUpdates(false);
67
68
  throw e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.747",
3
+ "version": "1.0.748",
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",
@@ -111,7 +111,8 @@ export class ClientTransactionsManager extends TransactionsManager<SolautoClient
111
111
 
112
112
  const updateLut = await client.updateLookupTable();
113
113
 
114
- if (updateLut && (updateLut?.new || updateLut.accountsToAdd.length > 4)) {
114
+ const updateLutInSepTx = updateLut?.new || (updateLut?.accountsToAdd ?? []).length > 4;
115
+ if (updateLut && updateLutInSepTx) {
115
116
  await this.updateLut(updateLut.tx, updateLut.new);
116
117
  }
117
118
  this.lookupTables.defaultLuts = client.defaultLookupTables();
@@ -124,7 +125,7 @@ export class ClientTransactionsManager extends TransactionsManager<SolautoClient
124
125
 
125
126
  await this.addChoreTxs(
126
127
  items,
127
- updateLut && !updateLut?.new ? updateLut.tx : undefined
128
+ updateLut && !updateLutInSepTx ? updateLut.tx : undefined
128
129
  );
129
130
 
130
131
  const result = await super.send(items).catch((e) => {