Skip to content

Commit

Permalink
feat: add debug view for flags
Browse files Browse the repository at this point in the history
  • Loading branch information
TrGiLong committed Feb 20, 2024
1 parent 256da8b commit 51e6992
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions p2p_wallet/Scenes/DebugMenu/View/DebugMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ struct DebugMenuView: View {
NavigationLink("Socket", destination: SocketDebugView())
NavigationLink("Web3Auth", destination: OnboardingDebugView())
NavigationLink("History") { HistoryDebugView() }
NavigationLink("Flags") { FlagDebugMenuView() }
}
}

Expand Down
24 changes: 24 additions & 0 deletions p2p_wallet/Scenes/DebugMenu/View/FlagDebugMenuView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import SwiftUI

struct FlagDebugMenuView: View {
var body: some View {
List {
DebugText(title: "ETH Address", value: "\(available(.ethAddressEnabled))")
DebugText(title: "Invest Solend", value: "\(available(.investSolendFeature))")
DebugText(title: "Mocked API Gateway", value: "\(available(.mockedApiGateway))")
DebugText(title: "Mocked TKey Facade", value: "\(available(.mockedTKeyFacade))")
DebugText(title: "Onboarding Username", value: "\(available(.onboardingUsernameEnabled))")
DebugText(title: "Onboarding Username Button Skip", value: "\(available(.onboardingUsernameButtonSkipEnabled))")
DebugText(title: "PnL", value: "\(available(.pnlEnabled))")
DebugText(title: "Referral Program", value: "\(available(.referralProgramEnabled))")
DebugText(title: "Send Via Link", value: "\(available(.sendViaLinkEnabled))")
DebugText(title: "Simulated Social Error", value: "\(available(.simulatedSocialError))")
DebugText(title: "Solana ETH Address", value: "\(available(.solanaEthAddressEnabled))")
DebugText(title: "Solana Negative Status", value: "\(available(.solanaNegativeStatus))")
DebugText(title: "Solend Disable Placeholder", value: "\(available(.solendDisablePlaceholder))")
DebugText(title: "Swap Transaction Simulation", value: "\(available(.swapTransactionSimulationEnabled))")
DebugText(title: "Sell Scenario", value: "\(available(.sellScenarioEnabled))")
}
.navigationTitle("Flags")
}
}

0 comments on commit 51e6992

Please sign in to comment.