Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/debug #77

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 8 additions & 10 deletions dydx/dydxStateManager/dydxStateManager/AbacusStateManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading