Skip to content

Commit

Permalink
add min(DEFAULT_TARGET_LEVERAGE, ...) to new code
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu committed Nov 15, 2024
1 parent 7e0c33c commit 88eb769
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ internal class TradeInputProcessor(
val market = marketSummaryState.markets[trade.marketId]
val maxMarketLeverage = market?.perpetualMarket?.configs?.maxMarketLeverage
?: Numeric.double.ONE
trade.targetLeverage = maxMarketLeverage
trade.targetLeverage = min(DEFAULT_TARGET_LEVERAGE, maxMarketLeverage)
}

val changedSubaccountNumbers =
Expand Down

0 comments on commit 88eb769

Please sign in to comment.