diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Settings/dydxSettingsLandingViewBuilder.swift b/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Settings/dydxSettingsLandingViewBuilder.swift index a38abf121..9e318dac6 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Settings/dydxSettingsLandingViewBuilder.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/Profile/Settings/dydxSettingsLandingViewBuilder.swift @@ -30,11 +30,18 @@ private class dydxSettingsLandingViewPresenter: SettingsLandingViewPresenter { init() { let definitionFile: String - if DebugEnabled.enabled { + switch Installation.source { + case .debug: definitionFile = "settings_debug.json" - } else { + + case .testFlight: + definitionFile = DebugEnabled.enabled ? "settings_debug.json" : "settings.json" + + default: + // Other than during debugging and DebugEnabled for TestFlight build, we should never show the debug screen definitionFile = "settings.json" } + super.init(definitionFile: definitionFile, keyValueStore: SettingsStore.shared, appScheme: Bundle.main.scheme) diff --git a/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift b/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift index c9f8689dc..5dccbd7fa 100644 --- a/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift +++ b/dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift @@ -140,25 +140,23 @@ public final class AbacusStateManager: NSObject { if dydxBoolFeatureFlag.force_mainnet.isEnabled { deployment = "MAINNET" appConfigs = AppConfigs.companion.forApp - } else if DebugEnabled.enabled { - // For debugging only - deployment = "DEV" - #if DEBUG - appConfigs = AppConfigs.companion.forAppDebug - #else - appConfigs = AppConfigs.companion.forApp - #endif } else { // Expose more options for Testflight build switch Installation.source { case .appStore: deployment = "MAINNET" - case .debug, .jailBroken: + appConfigs = AppConfigs.companion.forApp + case .debug: + // For debugging only + deployment = "DEV" + appConfigs = AppConfigs.companion.forAppDebug + case .jailBroken: deployment = "TESTNET" + appConfigs = AppConfigs.companion.forApp case .testFlight: deployment = "TESTFLIGHT" + appConfigs = AppConfigs.companion.forApp } - appConfigs = AppConfigs.companion.forApp } appConfigs.squidVersion = AppConfigs.SquidVersion.v2