taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit cb557298d32958809776c30c3889bc7c7399eb76
parent 4d1643c3350f9154ea2a32b20e07e6e2391484b4
Author: Marc Stibane <marc@taler.net>
Date:   Thu,  3 Sep 2026 23:22:38 +0200

fix logTransactions

Diffstat:
MTalerWallet1/Backend/WalletCore.swift | 4++--
MTalerWallet1/Views/Settings/DebugSettingsView.swift | 5++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift @@ -24,6 +24,8 @@ class WalletCore: QuickjsMessageHandler { public static let shared = try! WalletCore() // will (and should) crash on failure private let symLog = SymLogC() + @AppStorage("logTransactions") var logTransactions: Bool = false + private var queue: DispatchQueue private var semaphore: DispatchSemaphore @@ -36,7 +38,6 @@ class WalletCore: QuickjsMessageHandler { var nativeDB: Bool var isObserving: Int var isLogging: Bool - var logTransactions: Bool let logger = Logger(subsystem: "net.taler.gnu", category: "WalletCore") private var expired: [String] = [] // save txID of expired items to not beep twice @@ -108,7 +109,6 @@ class WalletCore: QuickjsMessageHandler { nativeDB = false isObserving = 0 isLogging = false - logTransactions = false // logger.trace("init Quickjs") requestsMade = 0 queue = DispatchQueue(label: "net.taler.myQueue", attributes: .concurrent) diff --git a/TalerWallet1/Views/Settings/DebugSettingsView.swift b/TalerWallet1/Views/Settings/DebugSettingsView.swift @@ -84,8 +84,7 @@ struct DebugSettingsView: View { } if showDevelopItems { #if DEBUG - SettingsToggle(name: String("Log Transactions"), value: $logTransactions.onChange({ isLogging in - walletCore.logTransactions = isLogging}), + SettingsToggle(name: String("Log Transactions"), value: $logTransactions, id1: "logTransactions", description: String("full log with all tx")) #endif @@ -95,7 +94,7 @@ struct DebugSettingsView: View { SettingsTriState(name: observability, value: $localConsoleO.onChange({ isObserving in walletCore.isObserving = isObserving}), id1: "observe", - description: localConsStr) { isObserving in + description: localConsStr) { _ in let consoleManager = LCManager.shared consoleManager.isVisible = localConsoleO != 0 || localConsoleL consoleManager.clear()