@haven-fi/solauto-sdk 1.0.692 → 1.0.693

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.
@@ -203,7 +203,7 @@ class RebalanceTxBuilder {
203
203
  // TODO: remove me
204
204
  if ((0, utils_1.isMarginfiPosition)(this.client.pos)) {
205
205
  const weightedAssets = this.values.endResult.supplyUsd * (0, utils_1.bytesToI80F48)(this.client.pos.supplyBank.config.assetWeightInit.value);
206
- const weightedLiabs = this.values.endResult.debtUsd * (0, utils_1.bytesToI80F48)(this.client.pos.debtBank.config.assetWeightInit.value);
206
+ const weightedLiabs = this.values.endResult.debtUsd * (0, utils_1.bytesToI80F48)(this.client.pos.debtBank.config.liabilityWeightInit.value);
207
207
  (0, utils_1.consoleLog)("Weighted assets & liabs:", weightedAssets, weightedLiabs);
208
208
  }
209
209
  const firstRebalance = this.client.rebalanceIx(generated_1.RebalanceStep.PreSwap, rebalanceDetails);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.692",
3
+ "version": "1.0.693",
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",
@@ -350,7 +350,7 @@ export class RebalanceTxBuilder {
350
350
  // TODO: remove me
351
351
  if (isMarginfiPosition(this.client.pos)) {
352
352
  const weightedAssets = this.values.endResult.supplyUsd * bytesToI80F48(this.client.pos.supplyBank!.config.assetWeightInit.value);
353
- const weightedLiabs = this.values.endResult.debtUsd * bytesToI80F48(this.client.pos.debtBank!.config.assetWeightInit.value);
353
+ const weightedLiabs = this.values.endResult.debtUsd * bytesToI80F48(this.client.pos.debtBank!.config.liabilityWeightInit.value);
354
354
  consoleLog("Weighted assets & liabs:", weightedAssets, weightedLiabs);
355
355
  }
356
356