Skip to content

Commit

Permalink
replace usage of initialMarginFraction with `effectiveInitialMargin…
Browse files Browse the repository at this point in the history
…Fraction`
  • Loading branch information
mike-dydx committed Jun 27, 2024
1 parent 9106407 commit 4a169c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private class dydxTargetLeverageViewPresenter: HostedViewPresenter<dydxTargetLev
.compactMap { $0 }
.sink { [weak self] configsAndAssetMap, tradeInput in
guard let viewModel = self?.viewModel, let marketId = tradeInput?.marketId, let market = configsAndAssetMap[marketId] else { return }
if let imf = market.configs?.initialMarginFraction?.doubleValue, imf > 0 {
if let imf = market.configs?.effectiveInitialMarginFraction?.doubleValue, imf > 0 {
let maxLeverage = 1.0 / imf
viewModel.leverageOptions = [1, 2, 5, 10]
.filter { $0 < maxLeverage }
Expand Down

0 comments on commit 4a169c5

Please sign in to comment.