From 51e6992d0e03008cc2f715e8177bae79d109e439 Mon Sep 17 00:00:00 2001 From: Tran Giang Long Date: Wed, 21 Feb 2024 00:08:33 +0700 Subject: [PATCH] feat: add debug view for flags --- .../Scenes/DebugMenu/View/DebugMenuView.swift | 1 + .../DebugMenu/View/FlagDebugMenuView.swift | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 p2p_wallet/Scenes/DebugMenu/View/FlagDebugMenuView.swift diff --git a/p2p_wallet/Scenes/DebugMenu/View/DebugMenuView.swift b/p2p_wallet/Scenes/DebugMenu/View/DebugMenuView.swift index 17c851cf6..9f0adc878 100644 --- a/p2p_wallet/Scenes/DebugMenu/View/DebugMenuView.swift +++ b/p2p_wallet/Scenes/DebugMenu/View/DebugMenuView.swift @@ -98,6 +98,7 @@ struct DebugMenuView: View { NavigationLink("Socket", destination: SocketDebugView()) NavigationLink("Web3Auth", destination: OnboardingDebugView()) NavigationLink("History") { HistoryDebugView() } + NavigationLink("Flags") { FlagDebugMenuView() } } } diff --git a/p2p_wallet/Scenes/DebugMenu/View/FlagDebugMenuView.swift b/p2p_wallet/Scenes/DebugMenu/View/FlagDebugMenuView.swift new file mode 100644 index 000000000..20d3791f2 --- /dev/null +++ b/p2p_wallet/Scenes/DebugMenu/View/FlagDebugMenuView.swift @@ -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") + } +}