@haven-fi/solauto-sdk 1.0.288 → 1.0.290

Sign up to get free protection for your applications and to get access to all the features.
@@ -234,7 +234,7 @@ class TransactionsManager {
234
234
  getUpdatedPriorityFeeSetting(prevError, attemptNum) {
235
235
  if (prevError instanceof web3_js_1.TransactionExpiredBlockheightExceededError) {
236
236
  const currIdx = types_1.priorityFeeSettingValues.indexOf(this.priorityFeeSetting);
237
- return types_1.priorityFeeSettingValues[Math.min(types_1.priorityFeeSettingValues.length - 1, currIdx + (attemptNum === 1 ? 1 : 1 + Math.ceil(attemptNum / 4)))];
237
+ return types_1.priorityFeeSettingValues[Math.min(types_1.priorityFeeSettingValues.length - 1, currIdx + 1 + Math.floor(attemptNum / 3))];
238
238
  }
239
239
  return this.priorityFeeSetting;
240
240
  }
@@ -1 +1 @@
1
- {"version":3,"file":"numberUtils.d.ts","sourceRoot":"","sources":["../../src/utils/numberUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,GACtB,MAAM,CAMR;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAqBrD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAejE;AAED,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,E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,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAqBrD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAejE;AAED,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,2BAA2B,EAAE,MAAM,EACnC,gBAAgB,CAAC,EAAE,MAAM,UAW1B;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,OAAO,EACnB,2BAA2B,EAAE,MAAM,GAAG,SAAS,EAC/C,mBAAmB,EAAE,MAAM,EAC3B,kBAAkB,EAAE,kBAAkB,GACrC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAiDA;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAKR;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAKzE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAKvE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAKvE"}
@@ -99,6 +99,7 @@ function getSolautoFeesBps(isReferred, targetLiqUtilizationRateBps, positionNetW
99
99
  }
100
100
  let referrer = 0;
101
101
  if (isReferred) {
102
+ feeBps *= 0.9;
102
103
  referrer = Math.floor(feeBps / 5);
103
104
  }
104
105
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.288",
3
+ "version": "1.0.290",
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",
@@ -340,7 +340,7 @@ export class TransactionsManager {
340
340
  return priorityFeeSettingValues[
341
341
  Math.min(
342
342
  priorityFeeSettingValues.length - 1,
343
- currIdx + (attemptNum === 1 ? 1 : 1 + Math.ceil(attemptNum / 4))
343
+ currIdx + 1 + Math.floor(attemptNum / 3)
344
344
  )
345
345
  ];
346
346
  }
@@ -136,6 +136,7 @@ export function getSolautoFeesBps(
136
136
 
137
137
  let referrer = 0;
138
138
  if (isReferred) {
139
+ feeBps *= 0.9;
139
140
  referrer = Math.floor(feeBps / 5);
140
141
  }
141
142