Skip to content

Commit

Permalink
add remainderBaseAmount to perpPositionValue (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowkeynicc authored Dec 18, 2023
1 parent 0a1e63e commit 2f8c171
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sdk/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1401,8 +1401,12 @@ export class User {
includeOpenOrders = false
): BN {
const userPosition =
this.getPerpPositionWithLPSettle(marketIndex)[0] ||
this.getEmptyPosition(marketIndex);
this.getPerpPositionWithLPSettle(
marketIndex,
undefined,
false,
true
)[0] || this.getEmptyPosition(marketIndex);
const market = this.driftClient.getPerpMarketAccount(
userPosition.marketIndex
);
Expand Down

0 comments on commit 2f8c171

Please sign in to comment.