commit 28a47758125a242a416a5d8884d2f130ef2e2d9f
parent d98cf41486adae8115904e0dbbfd03da0e272934
Author: Marc Stibane <marc@taler.net>
Date: Wed, 4 Nov 2026 06:55:25 +0100
fix Error of Debug-Mode; remove devExperiment from AppStore-builds
Diffstat:
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift
@@ -423,9 +423,8 @@ class Controller: ObservableObject {
}
@MainActor
func refreshMailbox(_ stack: CallStack) async {
- // Do we have a mailbox?
- let model = WalletModel.shared
- if let mailboxConfiguration {
+ if let mailboxConfiguration { // Do we have a mailbox?
+ let model = WalletModel.shared
if let response = try? await model.refreshMailbox(mailboxConfiguration) {
let countNew = response.messages.count
if let response2 = try? await model.getMailboxMessages() {
@@ -647,7 +646,7 @@ class Controller: ObservableObject {
currencyInfos[scope] = newInfo
currencyTicker += 1 // triggers published view update
}
-
+#if GNU_TALER || TALER_NIGHTLY
@MainActor
func setDelayAsync(_ delay: Int, _ f500: Int) async {
let delayTime = delay > 0 ? 3000
@@ -658,19 +657,19 @@ class Controller: ObservableObject {
: 0 ) : 0
symLog.log(delay != 0 ? "wallet-core delaying by \(delayTime) milliseconds, with \(fakeValue) fake_500"
: "wallet-core stop delaying")
-// try? await model.setConfig(setTesting: newVal)
tcDelay = delay
fake500 = f500
let model = WalletModel.shared
+ try? await model.setConfig(setTesting: true)
try? await model.devExperimentT("taler://dev-experiment/start-tc?fake_500_count=\(fakeValue)&delay_resp=\(delayTime)")
}
-
@MainActor
func setDelay(_ delay: Int, _ f500: Int) {
Task {
await setDelayAsync(delay, f500)
}
}
+#endif
// MARK: -
@MainActor
func initWalletCore(stack: CallStack, setTesting: Bool, delay: TimeInterval)
diff --git a/TalerWallet1/Views/Settings/DebugSettingsView.swift b/TalerWallet1/Views/Settings/DebugSettingsView.swift
@@ -66,10 +66,13 @@ struct DebugSettingsView: View {
id1: "devMode",
description: String("More information intended for debugging")) { newVal in
withAnimation(Animation.linear.delay(0.8)) { showDevelopItems = developerMode }
+#if GNU_TALER || TALER_NIGHTLY
symLog.log((newVal ? "enabling" : "disabling") + " applyDevExperiment")
controller.setDelay(newVal ? controller.tcDelay : 0, controller.fake500)
+#endif
}
if showDevelopItems {
+#if GNU_TALER || TALER_NIGHTLY
let doDelay = String("WalletCore delay")
let delay = controller.tcDelay
SettingsTriState(name: doDelay,
@@ -94,6 +97,7 @@ struct DebugSettingsView: View {
controller.setDelay(controller.tcDelay, fake)
}
}
+#endif
#if DEBUG
SettingsToggle(name: String("Log Transactions"), value: $logTransactions,
id1: "logTransactions",
@@ -184,6 +188,7 @@ struct DebugSettingsView: View {
.disabled(withDrawDisabled)
}.id("head1withdraw")
#if DEBUG
+ #if GNU_TALER || TALER_NIGHTLY
SettingsItem(name: String("Run Dev Experiment Refresh"),
id1: "applyDevExperiment",
description: "dev-experiment/insert-pending-refresh") {
@@ -198,6 +203,7 @@ struct DebugSettingsView: View {
}
.buttonStyle(.bordered)
}.id("Refresh")
+ #endif
#endif
SettingsItem(name: String("Run Integration Test"),
id1: "demo1test",