Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Jun 3, 2024
1 parent ad2c5a8 commit 2db2027
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class dydxTradeInputMarginViewPresenter: HostedViewPresenter<dydxTradeInputMargi
AbacusStateManager.shared.state.tradeInput
.compactMap { $0 }
.sink {[weak self] tradeInput in
self?.viewModel?.marginMode = DataLocalizer.localize(path: "APP.GENERAL.\(tradeInput.marginMode.rawValue)")
self?.viewModel?.marginLeverage = "\(tradeInput.targetLeverage)×"
self?.update(withTradeInput: tradeInput)
}
.store(in: &subscriptions)

Expand All @@ -44,7 +43,8 @@ class dydxTradeInputMarginViewPresenter: HostedViewPresenter<dydxTradeInputMargi
}
}

private func updateMarginMode(mode: MarginMode) {

private func update(withTradeInput tradeInput: Abacus.TradeInput) {
viewModel?.marginMode = DataLocalizer.localize(path: "APP.GENERAL.\(tradeInput.marginMode.rawValue)")
viewModel?.marginLeverage = "\(tradeInput.targetLeverage)×"
}
}

0 comments on commit 2db2027

Please sign in to comment.