From 76167c2f1fa629122f505f7eb0a4a96d7b7748d6 Mon Sep 17 00:00:00 2001 From: mike-dydx Date: Thu, 27 Jun 2024 16:30:05 -0400 Subject: [PATCH] incl 3x as a target leverage --- .../_v4/Trade/Margin/dydxTargetLeverageViewBuilder.swift | 2 +- .../dydxViews/_v4/Trade/Margin/dydxTargetLeverageView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/Trade/Margin/dydxTargetLeverageViewBuilder.swift b/dydx/dydxPresenters/dydxPresenters/_v4/Trade/Margin/dydxTargetLeverageViewBuilder.swift index 8a91e74bb..d79759e3b 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/Trade/Margin/dydxTargetLeverageViewBuilder.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/Trade/Margin/dydxTargetLeverageViewBuilder.swift @@ -93,7 +93,7 @@ private class dydxTargetLeverageViewPresenter: HostedViewPresenter 0 { let maxLeverage = 1.0 / imf - viewModel.leverageOptions = [1, 2, 5, 10] + viewModel.leverageOptions = [1, 2, 3, 5, 10] .filter { $0 < maxLeverage } .map { dydxTargetLeverageViewModel.LeverageTextAndValue(text: dydxFormatter.shared.multiplier(number: Double($0)) ?? "", value: $0) } viewModel.leverageOptions.append(dydxTargetLeverageViewModel.LeverageTextAndValue(text: DataLocalizer.localize(path: "APP.GENERAL.MAX"), value: maxLeverage)) diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/dydxTargetLeverageView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/dydxTargetLeverageView.swift index cbb895848..d727ff2c9 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/Margin/dydxTargetLeverageView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/Margin/dydxTargetLeverageView.swift @@ -79,7 +79,7 @@ public class dydxTargetLeverageViewModel: PlatformViewModel { private func createOptionsGroup(parentStyle: ThemeStyle) -> some View { let spacing: CGFloat = 8 - let maxItemsToDisplay = CGFloat(min(5, leverageOptions.count)) + let maxItemsToDisplay = CGFloat(leverageOptions.count) return SingleAxisGeometryReader { width in let width = (width + spacing) / maxItemsToDisplay - spacing