From e80617f657e54b036168347effe8db304481352d Mon Sep 17 00:00:00 2001 From: mike-dydx Date: Fri, 3 May 2024 12:13:13 -0400 Subject: [PATCH 1/5] clean up --- .../dydxTakeProfitStopLossViewPresenter.swift | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift index 7ea57af36..1474177c6 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift @@ -79,28 +79,6 @@ private class dydxTakeProfitStopLossViewPresenter: HostedViewPresenter Date: Fri, 3 May 2024 12:43:59 -0400 Subject: [PATCH 2/5] default to classic_dark instead of dark --- .../dydxPresenters/_v4/KeyValueStoreProtocolStore+Ext.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/KeyValueStoreProtocolStore+Ext.swift b/dydx/dydxPresenters/dydxPresenters/_v4/KeyValueStoreProtocolStore+Ext.swift index 2f218898a..349a08861 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/KeyValueStoreProtocolStore+Ext.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/KeyValueStoreProtocolStore+Ext.swift @@ -18,7 +18,7 @@ public enum dydxSettingsStoreKey: String, CaseIterable { public var defaultValue: Any? { switch self { case .language: return DataLocalizer.shared?.language - case .v4Theme: return dydxThemeType.dark.rawValue + case .v4Theme: return dydxThemeType.classicDark.rawValue case .directionColorPreference: return "green_is_up" case .shouldDisplayInAppNotifications: return true } From 1d12e6ec466f155bb67c04165e09efb7f218b298 Mon Sep 17 00:00:00 2001 From: mike-dydx Date: Fri, 3 May 2024 12:51:55 -0400 Subject: [PATCH 3/5] display oracle price and entry price as dollar formatted values --- .../dydxTakeProfitStopLossViewPresenter.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift index 1474177c6..e4e422d4c 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift @@ -112,7 +112,7 @@ private class dydxTakeProfitStopLossViewPresenter: HostedViewPresenter Date: Fri, 3 May 2024 13:23:19 -0400 Subject: [PATCH 4/5] handle pendingOrders == 0 --- .../dydxTakeProfitStopLossViewPresenter.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift index e4e422d4c..3c991bf5c 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/TakeProfitStopLoss/dydxTakeProfitStopLossViewPresenter.swift @@ -380,6 +380,10 @@ private class dydxTakeProfitStopLossViewPresenter: HostedViewPresenter Date: Fri, 3 May 2024 13:23:32 -0400 Subject: [PATCH 5/5] call on edited only when focused --- .../Components/dydxGainLossInputViewModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/dydx/dydxViews/dydxViews/_v4/TakeProfitStopLoss/Components/dydxGainLossInputViewModel.swift b/dydx/dydxViews/dydxViews/_v4/TakeProfitStopLoss/Components/dydxGainLossInputViewModel.swift index a8e05a422..3fb9bafe9 100644 --- a/dydx/dydxViews/dydxViews/_v4/TakeProfitStopLoss/Components/dydxGainLossInputViewModel.swift +++ b/dydx/dydxViews/dydxViews/_v4/TakeProfitStopLoss/Components/dydxGainLossInputViewModel.swift @@ -125,6 +125,7 @@ struct dydxGainLossInputView: View { } private func displayTextOnChange(newValue: String) { + guard isFocused else { return } viewModel.onEdited?(newValue, viewModel.curUnit) }