Skip to content

Commit e7d4338

Browse files
committed
Remove debug section from wallet settings on iOS and Android
1 parent 31beada commit e7d4338

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

android/app/src/main/java/org/bitcoinppl/cove/flows/SettingsFlow/WalletSettingsScreen.kt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import androidx.compose.ui.text.style.TextAlign
5050
import androidx.compose.ui.unit.dp
5151
import androidx.compose.ui.unit.sp
5252
import org.bitcoinppl.cove.AppManager
53-
import org.bitcoinppl.cove.BuildConfig
5453
import org.bitcoinppl.cove.Log
5554
import org.bitcoinppl.cove.R
5655
import org.bitcoinppl.cove.WalletManager
@@ -248,25 +247,6 @@ fun WalletSettingsScreen(
248247
}
249248
}
250249

251-
if (BuildConfig.DEBUG) {
252-
SectionHeader("Debug")
253-
MaterialSection {
254-
MaterialSettingsItem(
255-
title = "Simulate Missing Key",
256-
titleColor = CoveColor.WarningOrange,
257-
onClick = {
258-
manager.rust.setWalletType(WalletType.HOT)
259-
val wallets = runCatching { Database().wallets().all() }.getOrElse { emptyList() }
260-
val other = wallets.firstOrNull { it.id != metadata.id }
261-
if (other != null) {
262-
app.rust.selectWallet(other.id)
263-
} else {
264-
app.popRoute()
265-
}
266-
},
267-
)
268-
}
269-
}
270250

271251
SectionHeader(stringResource(R.string.title_wallet_danger_zone))
272252
MaterialSection {

ios/Cove/Flows/SettingsFlow/WalletSettings/WalletSettingsView.swift

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,23 +145,6 @@ struct WalletSettingsView: View {
145145
.padding(.vertical, 1)
146146
}
147147

148-
#if DEBUG
149-
Section(header: Text("Debug")) {
150-
Button("Simulate Missing Key") {
151-
manager.rust.setWalletType(walletType: .hot)
152-
if let wallets = try? Database().wallets().all(),
153-
let other = wallets.first(where: { $0.id != manager.walletMetadata.id })
154-
{
155-
app.selectWallet(other.id)
156-
} else {
157-
dismiss()
158-
}
159-
}
160-
.font(.subheadline)
161-
.foregroundColor(.orange)
162-
}
163-
#endif
164-
165148
Section(header: Text("Danger Zone")) {
166149
if manager.walletMetadata.walletType == .hot {
167150
Button {

0 commit comments

Comments
 (0)