@haven-fi/solauto-sdk 1.0.335 → 1.0.336

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.
@@ -51,11 +51,11 @@ async function getTipInstruction(signer, tipLamports) {
51
51
  // );
52
52
  // }
53
53
  async function umiToVersionedTransactions(umi, signer, txs, sign, feeEstimates, computeUnitLimits) {
54
- const builtTxs = await Promise.all(txs.map(async (tx, i) => {
54
+ let builtTxs = await Promise.all(txs.map(async (tx, i) => {
55
55
  return (await (0, solanaUtils_1.assembleFinalTransaction)(signer, tx, feeEstimates ? feeEstimates[i] : undefined, computeUnitLimits ? computeUnitLimits[i] : undefined).setLatestBlockhash(umi)).build(umi);
56
56
  }));
57
57
  if (sign) {
58
- await signer.signAllTransactions(builtTxs);
58
+ builtTxs = await signer.signAllTransactions(builtTxs);
59
59
  }
60
60
  return builtTxs.map((x) => (0, umi_web3js_adapters_1.toWeb3JsTransaction)(x));
61
61
  }
@@ -98,7 +98,7 @@ function eligibleForRebalance(positionState, positionSettings, positionDca, curr
98
98
  0.95 >
99
99
  values.debtAdjustmentUsd;
100
100
  if (!sufficientLiquidity) {
101
- console.log("Insufficient debt liquidity to further boost");
101
+ (0, generalUtils_1.consoleLog)("Insufficient debt liquidity to further boost");
102
102
  }
103
103
  return sufficientLiquidity ? "boost" : undefined;
104
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.335",
3
+ "version": "1.0.336",
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",
@@ -74,7 +74,7 @@ async function umiToVersionedTransactions(
74
74
  feeEstimates?: number[],
75
75
  computeUnitLimits?: number[]
76
76
  ): Promise<VersionedTransaction[]> {
77
- const builtTxs = await Promise.all(
77
+ let builtTxs = await Promise.all(
78
78
  txs.map(async (tx, i) => {
79
79
  return (
80
80
  await assembleFinalTransaction(
@@ -88,7 +88,7 @@ async function umiToVersionedTransactions(
88
88
  );
89
89
 
90
90
  if (sign) {
91
- await signer.signAllTransactions(builtTxs);
91
+ builtTxs = await signer.signAllTransactions(builtTxs);
92
92
  }
93
93
 
94
94
  return builtTxs.map((x) => toWeb3JsTransaction(x));
@@ -22,7 +22,7 @@ import {
22
22
  getSolautoPositionAccountDataSerializer,
23
23
  getSolautoPositionSize,
24
24
  } from "../../generated";
25
- import { currentUnixSeconds } from "../generalUtils";
25
+ import { consoleLog, currentUnixSeconds } from "../generalUtils";
26
26
  import {
27
27
  fromBaseUnit,
28
28
  getLiqUtilzationRateBps,
@@ -184,7 +184,7 @@ export function eligibleForRebalance(
184
184
  0.95 >
185
185
  values.debtAdjustmentUsd;
186
186
  if (!sufficientLiquidity) {
187
- console.log("Insufficient debt liquidity to further boost");
187
+ consoleLog("Insufficient debt liquidity to further boost");
188
188
  }
189
189
  return sufficientLiquidity ? "boost" : undefined;
190
190
  }