@haven-fi/solauto-sdk 1.0.191 → 1.0.192

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.
@@ -434,7 +434,7 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
434
434
  if (state) {
435
435
  return state;
436
436
  }
437
- const freshState = await (0, marginfiUtils_1.getMarginfiAccountPositionState)(this.umi, this.marginfiAccountPk, this.selfManaged ? undefined : this.supplyMint, this.selfManaged ? undefined : this.debtMint, this.livePositionUpdates);
437
+ const freshState = await (0, marginfiUtils_1.getMarginfiAccountPositionState)(this.umi, this.marginfiAccountPk, !this.selfManaged && this.solautoPositionData === null ? this.supplyMint : undefined, !this.selfManaged && this.solautoPositionData === null ? this.debtMint : undefined, this.livePositionUpdates);
438
438
  if (freshState) {
439
439
  this.log("Fresh state", freshState);
440
440
  const supplyPrice = (0, generalUtils_1.safeGetPrice)(freshState?.supply.mint);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.191",
3
+ "version": "1.0.192",
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",
@@ -651,8 +651,8 @@ export class SolautoMarginfiClient extends SolautoClient {
651
651
  const freshState = await getMarginfiAccountPositionState(
652
652
  this.umi,
653
653
  this.marginfiAccountPk,
654
- this.selfManaged ? undefined : this.supplyMint,
655
- this.selfManaged ? undefined : this.debtMint,
654
+ !this.selfManaged && this.solautoPositionData === null ? this.supplyMint : undefined,
655
+ !this.selfManaged && this.solautoPositionData === null ? this.debtMint : undefined,
656
656
  this.livePositionUpdates
657
657
  );
658
658