@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.
package/dist/utils/jitoUtils.js
CHANGED
@@ -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
|
-
|
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
|
-
|
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
package/src/utils/jitoUtils.ts
CHANGED
@@ -74,7 +74,7 @@ async function umiToVersionedTransactions(
|
|
74
74
|
feeEstimates?: number[],
|
75
75
|
computeUnitLimits?: number[]
|
76
76
|
): Promise<VersionedTransaction[]> {
|
77
|
-
|
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
|
-
|
187
|
+
consoleLog("Insufficient debt liquidity to further boost");
|
188
188
|
}
|
189
189
|
return sufficientLiquidity ? "boost" : undefined;
|
190
190
|
}
|