@haven-fi/solauto-sdk 1.0.231 → 1.0.232
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.
@@ -177,7 +177,7 @@ async function sendSingleOptimizedTransaction(umi, connection, tx, txType, attem
|
|
177
177
|
if (txType !== "skip-simulation") {
|
178
178
|
// TODO: we should only retry simulation if it's not a solauto error
|
179
179
|
const simulationResult = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => await simulateTransaction(connection, (0, umi_web3js_adapters_1.toWeb3JsTransaction)(await (await assembleFinalTransaction(umi.identity, tx, cuPrice, 1400000).setLatestBlockhash(umi)).build(umi))), 3);
|
180
|
-
computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.
|
180
|
+
computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.05);
|
181
181
|
(0, generalUtils_1.consoleLog)("Compute unit limit: ", computeUnitLimit);
|
182
182
|
}
|
183
183
|
if (txType !== "only-simulate") {
|
package/package.json
CHANGED
package/src/utils/solanaUtils.ts
CHANGED
@@ -330,7 +330,7 @@ export async function sendSingleOptimizedTransaction(
|
|
330
330
|
);
|
331
331
|
|
332
332
|
computeUnitLimit = Math.round(
|
333
|
-
simulationResult.value.unitsConsumed! * 1.
|
333
|
+
simulationResult.value.unitsConsumed! * 1.05
|
334
334
|
);
|
335
335
|
consoleLog("Compute unit limit: ", computeUnitLimit);
|
336
336
|
}
|