@haven-fi/solauto-sdk 1.0.230 → 1.0.232

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,7 @@ export interface SolautoPositionDetails {
12
12
  debtMint?: PublicKey;
13
13
  }
14
14
  export declare enum PriorityFeeSetting {
15
+ Low = "Low",
15
16
  Default = "Medium",
16
17
  High = "High"
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../src/types/solauto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oBAAY,kBAAkB;IAC5B,OAAO,WAAW;IAClB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,eAAe,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,kBAAkB,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC"}
1
+ {"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../src/types/solauto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oBAAY,kBAAkB;IAC5B,GAAG,QAAQ;IACX,OAAO,WAAW;IAClB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,eAAe,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,kBAAkB,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PriorityFeeSetting = void 0;
4
4
  var PriorityFeeSetting;
5
5
  (function (PriorityFeeSetting) {
6
+ PriorityFeeSetting["Low"] = "Low";
6
7
  PriorityFeeSetting["Default"] = "Medium";
7
8
  PriorityFeeSetting["High"] = "High";
8
9
  })(PriorityFeeSetting || (exports.PriorityFeeSetting = PriorityFeeSetting = {}));
@@ -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.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.230",
3
+ "version": "1.0.232",
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",
@@ -14,6 +14,7 @@ export interface SolautoPositionDetails {
14
14
  }
15
15
 
16
16
  export enum PriorityFeeSetting {
17
+ Low = "Low",
17
18
  Default = "Medium",
18
19
  High = "High",
19
20
  }
@@ -330,7 +330,7 @@ export async function sendSingleOptimizedTransaction(
330
330
  );
331
331
 
332
332
  computeUnitLimit = Math.round(
333
- simulationResult.value.unitsConsumed! * 1.1
333
+ simulationResult.value.unitsConsumed! * 1.05
334
334
  );
335
335
  consoleLog("Compute unit limit: ", computeUnitLimit);
336
336
  }