taler-ios

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

commit abb65ef5e8a6893d527f5f614d0677d4d888e8b3
parent 5917486196f5ade26a6139ef1a52c62e630b14c9
Author: Marc Stibane <marc@taler.net>
Date:   Fri, 30 May 2025 20:28:55 +0200

cleanup

Diffstat:
MTalerWallet1/Helper/CurrencySpecification.swift | 11+++++------
MTalerWallet1/Views/Actions/Banking/ManualWithdraw.swift | 4++--
MTalerWallet1/Views/Settings/SettingsView.swift | 3---
MTalerWallet1/Views/Transactions/ManualDetailsV.swift | 8++++----
MTalerWallet1/Views/Transactions/TransactionSummaryV.swift | 6+++---
5 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/TalerWallet1/Helper/CurrencySpecification.swift b/TalerWallet1/Helper/CurrencySpecification.swift @@ -22,7 +22,7 @@ extension Locale { return Locale.preferredLanguages.compactMap({Locale(identifier: $0).languageCode}) } } - +// MARK: - extension Locale { func leadingCurrencySymbol() -> Bool { let currencyFormatter = NumberFormatter() @@ -35,7 +35,7 @@ extension Locale { return currencySymbolLocation == 0 } } - +// MARK: - extension Amount { func formatted(_ currencyInfo: CurrencyInfo?, isNegative: Bool, useISO: Bool = false, a11yDecSep: String? = nil @@ -103,7 +103,7 @@ extension Amount { return plainString(inputDigits: inputDigits(currencyInfo)) } } - +// MARK: - public struct CurrencyInfo: Sendable { // let scope: ScopeInfo let specs: CurrencySpecification @@ -268,7 +268,7 @@ public struct CurrencyInfo: Sendable { return madeUpStr } } - +// MARK: - public struct CurrencySpecification: Codable, Sendable { enum CodingKeys: String, CodingKey { case name = "name" @@ -291,8 +291,7 @@ public struct CurrencySpecification: Codable, Sendable { /// This way, we can also communicate the currency symbol to be used. let altUnitNames: [Int : String]? } - - +// MARK: - public class CurrencyFormatter: NumberFormatter { var name: String? diff --git a/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift b/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift @@ -12,7 +12,7 @@ import SymLog // Called when tapping [􁾭Withdraw] // or from WithdrawExchangeV after a withdraw-exchange QR was scanned struct ManualWithdraw: View { - private let symLog = SymLogV() + private let symLog = SymLogV(0) let stack: CallStack let selectedBalance: Balance? @Binding var amountLastUsed: Amount @@ -126,7 +126,7 @@ struct ManualWithdraw: View { } // MARK: - struct ManualWithdrawContent: View { - private let symLog = SymLogV() + private let symLog = SymLogV(0) let stack: CallStack let scope: ScopeInfo @Binding var amountLastUsed: Amount diff --git a/TalerWallet1/Views/Settings/SettingsView.swift b/TalerWallet1/Views/Settings/SettingsView.swift @@ -138,9 +138,6 @@ struct SettingsView: View { .id("liststyle") let localConsStr = String(localized: "on LocalConsole") let observability = String(localized: "Observe walletCore") -// SettingsToggle(name: observability, value: $localConsoleO.onChange({ isObserving in -// walletCore.isObserving = isObserving}), id1: "localConsoleO", -// description: hideDescriptions ? nil : localConsStr) { SettingsTriState(name: observability, value: $localConsoleO.onChange({ isObserving in walletCore.isObserving = isObserving}), description: hideDescriptions ? nil : localConsStr) { isObserving in diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift b/TalerWallet1/Views/Transactions/ManualDetailsV.swift @@ -120,8 +120,8 @@ struct AccountPicker: View { // MARK: - struct ManualDetailsV: View { let stack: CallStack - var common : TransactionCommon - var details : WithdrawalDetails + let common: TransactionCommon + let details: WithdrawalDetails @EnvironmentObject private var model: WalletModel @AppStorage("minimalistic") var minimalistic: Bool = false @@ -142,8 +142,8 @@ struct ManualDetailsV: View { } @MainActor - private func viewDidLoad(_ payto: String) async { - if let specs = try? await model.getQrCodesForPayto(payto) { + private func viewDidLoad(_ paytoUri: String) async { + if let specs = try? await model.getQrCodesForPayto(paytoUri) { qrCodeSpecs = specs return } diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -265,7 +265,7 @@ struct TransactionSummaryV: View { } } } - + // MARK: - struct KYCbutton: View { let kycUrl: String? @@ -318,7 +318,7 @@ struct TransactionSummaryV: View { } // switch } } - + // MARK: - struct TypeDetail: View { let stack: CallStack let scope: ScopeInfo? @@ -562,7 +562,7 @@ struct TransactionSummaryV: View { } // Group } } - + // MARK: - struct QRCodeDetails: View { var transaction : TalerTransaction var body: some View {