@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
|
|
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
|
@@ -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
|
|
655
|
-
this.selfManaged
|
|
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
|
|