taler-ios

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

commit 11398cc4d142c99cbee6e31f0bf9d52447714156
parent 563d123acbbeed4c1ba0dc1073f6db31695d0a68
Author: Marc Stibane <marc@taler.net>
Date:   Sat, 12 Oct 2024 08:31:26 +0200

debugging

Diffstat:
MTalerWallet1/Backend/WalletCore.swift | 9++++++---
MTalerWallet1/Views/Actions/ActionsSheet.swift | 1+
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift @@ -145,7 +145,7 @@ extension WalletCore { } do { let jsonData = try JSONEncoder().encode(result) - symLog.log("\"id\":\(requestId) \(result)") +// symLog.log("\"id\":\(requestId) \(result)") // logger.info(result) TODO: log result completion(requestId, timeSent, jsonData, nil) } catch { // JSON encoding of response.result failed / should never happen @@ -411,16 +411,19 @@ print("\n❗️ WalletCore.swift:343 NEW Notification: ", anyPayload, "\n") let decoded = try JSONDecoder().decode(ResponseOrNotification.self, from: messageData) switch decoded.type { case "error": + symLog.log("\"id\":\(decoded.id ?? 0) \(message)") try handleError(decoded) case "response": + symLog.log("\"id\":\(decoded.id ?? 0) \(message)") try handleResponse(decoded) case "notification": +// symLog.log(message) try handleNotification(decoded.payload) case "tunnelHttp": // TODO: Handle tunnelHttp - symLog.log("Can't handle tunnelHttp: \(decoded)") // TODO: .error + symLog.log("Can't handle tunnelHttp: \(message)") // TODO: .error throw WalletBackendError.deserializationError default: - symLog.log("Unknown response type: \(decoded)") // TODO: .error + symLog.log("Unknown response type: \(message)") // TODO: .error throw WalletBackendError.deserializationError } } catch DecodingError.dataCorrupted(let context) { diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -6,6 +6,7 @@ * @author Marc Stibane */ import SwiftUI +import os.log import taler_swift /// This view shows the action sheet