Skip to content

Commit

Permalink
Jared/tra 313 position margin incorrect on adjust margin modal (#407)
Browse files Browse the repository at this point in the history
Co-authored-by: Rui <[email protected]>
  • Loading branch information
jaredvu and ruixhuang authored May 31, 2024
1 parent 0d112a9 commit 5f2e7e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ internal class AdjustIsolatedMarginInputCalculator(val parser: ParserProtocol) {
val crossMarginUsage = parentSubaccount?.get("marginUsage")
val openPositions = parser.asNativeMap(childSubaccount?.get("openPositions"))
val marketId = openPositions?.keys?.firstOrNull()
val positionMargin = childSubaccount?.get("freeCollateral")
val positionMargin = childSubaccount?.get("equity")
val positionLeverage = parser.value(childSubaccount, "openPositions.$marketId.leverage")
val liquidationPrice = parser.value(childSubaccount, "openPositions.$marketId.liquidationPrice")

Expand Down

0 comments on commit 5f2e7e5

Please sign in to comment.