taler-ios

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

commit 102444ffbbf477019ffac7265fed5a963ed6c5b7
parent 9525345216c93c6d48e0fc2270d817b2336a5a78
Author: Marc Stibane <marc@taler.net>
Date:   Wed,  2 Oct 2024 19:27:31 +0200

debugging

Diffstat:
MTalerWallet1/Controllers/Controller.swift | 7++++---
MTalerWallet1/Views/Banking/ExchangeSectionView.swift | 10++++++++--
MTalerWallet1/Views/Peer2peer/SendAmount.swift | 2+-
MTalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift | 2+-
MTalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift | 2+-
5 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -132,7 +132,7 @@ class Controller: ObservableObject { return info } } - logger.log(" ❗️ no info for \(currency)") +// logger.log(" ❗️ no info for \(currency)") return nil } func info(for currency: String, _ ticker: Int) -> CurrencyInfo { @@ -148,7 +148,7 @@ class Controller: ObservableObject { return true } } - logger.log(" ❗️ no info for \(currency)") +// logger.log(" ❗️ no info for \(currency)") return false } @@ -159,6 +159,7 @@ class Controller: ObservableObject { return exchange1 } if let exchange2 = try? await model.getExchangeByUrl(url: baseUrl) { +// logger.log(" ❗️ will add \(baseUrl)") exchanges.append(exchange2) return exchange2 } @@ -169,7 +170,7 @@ class Controller: ObservableObject { func updateInfo(_ scope: ScopeInfo, model: WalletModel) async { if let info = try? await model.getCurrencyInfoM(scope: scope) { await setInfo(info) - logger.log(" ❗️info set for \(scope.currency)") +// logger.log(" ❗️info set for \(scope.currency)") } } diff --git a/TalerWallet1/Views/Banking/ExchangeSectionView.swift b/TalerWallet1/Views/Banking/ExchangeSectionView.swift @@ -1,14 +1,19 @@ /* - * This file is part of GNU Taler, ©2022-23 Taler Systems S.A. + * This file is part of GNU Taler, ©2022-24 Taler Systems S.A. * See LICENSE.md */ +/** + * @author Marc Stibane + */ import SwiftUI import taler_swift +import SymLog /// This view shows the currency name in an exchange section /// currency /// [Deposit Coins] [Withdraw Coins] struct ExchangeSectionView: View { + private let symLog = SymLogV(0) let stack: CallStack @Binding var balances: [Balance] let exchange: Exchange @@ -49,7 +54,7 @@ struct ExchangeSectionView: View { disabled = true // don't try this more than once Task { // runs on MainActor if let _ = try? await model.deleteExchange(url: exchange.exchangeBaseUrl, purge: purge) { -// symLog.log("\(executed) \(transactionId)") + symLog.log("deleted \(baseUrl.trimURL())") didDelete = true // change button text } else { purge = true @@ -109,6 +114,7 @@ struct ExchangeSectionView: View { shouldReloadBalances: $shouldReloadBalances) } .task(id: controller.currencyTicker) { + symLog.log("task \(didDelete ? 1 : 0)") currencyInfo = controller.info(for: currency, controller.currencyTicker) currencyName = currencyInfo.scope.currency currencySymbol = currencyInfo.altUnitSymbol ?? currencyName diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift b/TalerWallet1/Views/Peer2peer/SendAmount.swift @@ -11,7 +11,7 @@ import SymLog // Called when tapping "Send Coins" in the balances list struct SendAmount: View { - private let symLog = SymLogV() + private let symLog = SymLogV(0) let stack: CallStack @Binding var currencyInfo: CurrencyInfo diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift @@ -10,7 +10,7 @@ import taler_swift import SymLog struct WithdrawAcceptView: View { - private let symLog = SymLogV() + private let symLog = SymLogV(0) let stack: CallStack @Binding var currencyInfo: CurrencyInfo let navTitle = String(localized: "Withdrawal") diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift @@ -13,7 +13,7 @@ import SymLog // We show the user the bank-integrated withdrawal details in a sheet - but first the ToS must be accepted. // After the user confirmed the withdrawal, we show a button to return to the bank website to authorize (2FA) struct WithdrawURIView: View { - private let symLog = SymLogV() + private let symLog = SymLogV(0) let stack: CallStack // the URL from the bank website