Skip to content

Commit 9294340

Browse files
committed
fix: liq statuses add to return signature
1 parent 9c6b4b0 commit 9294340

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/src/user.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,12 +2223,13 @@ export class User {
22232223
canBeLiquidated: boolean;
22242224
marginRequirement: BN;
22252225
totalCollateral: BN;
2226+
liquidationStatuses: Map<'cross' | number, { canBeLiquidated: boolean; marginRequirement: BN; totalCollateral: BN }>;
22262227
} {
22272228
// Deprecated signature retained for backward compatibility in type only
22282229
// but implementation now delegates to the new Map-based API and returns cross margin status.
22292230
const map = this.getLiquidationStatuses();
22302231
const cross = map.get('cross');
2231-
return cross ?? { canBeLiquidated: false, marginRequirement: ZERO, totalCollateral: ZERO };
2232+
return cross ? { ...cross, liquidationStatuses: map } : { canBeLiquidated: false, marginRequirement: ZERO, totalCollateral: ZERO, liquidationStatuses: map };
22322233
}
22332234

22342235
/**

0 commit comments

Comments
 (0)