commit 5a8fcced6008f35f8c2aee7532d2c9586e085699 parent 7b221aa7d15f13a1070ebaadc42ad87105b8f5c5 Author: Marc Stibane <marc@taler.net> Date: Wed, 7 Oct 2026 14:28:57 +0200 cleanup Diffstat:
5 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/TalerWallet1/Backend/WalletBackendRequest.swift b/TalerWallet1/Backend/WalletBackendRequest.swift @@ -132,14 +132,14 @@ struct MerchantInfo: Identifiable, Codable, Hashable, Sendable { } /// A tax made on a payment. -struct Tax: Codable { +struct Tax: Codable, Hashable { var name: String var tax: Amount } /// A product being purchased from a merchant. /// https://docs.taler.net/core/api-merchant.html#the-contract-terms -struct ProductSold: Codable, Identifiable { +struct ProductSold: Codable, Identifiable, Hashable { let productId: String? let productName: String? // let productGroupId: Int? @@ -147,7 +147,7 @@ struct ProductSold: Codable, Identifiable { let descriptionI18n: I18nDict? let quantity: Int? let unitQuantity: String? // float with max 6 fractional digits - let unit: String? // name of merchantUnit + let unit: String? // MerchantUnit? let price: Amount? // deprecated - use prices let prices: [Amount]? let pricesAreNet: Bool? diff --git a/TalerWallet1/Model/Model+Payment.swift b/TalerWallet1/Model/Model+Payment.swift @@ -457,7 +457,7 @@ struct ChoicesForPayment: Codable { if let ctChoices = terms.choices { let combined = Array(zip(choices, ctChoices, ctChoices.indices)) return (combined, true) - } else if let amount = terms.amount { // V0 + } else if let amount = terms.amount { // V0 = only 1 option let maxFee = terms.maxFee ?? Amount.zero(currency: amount.currencyStr) let ctChoice = ContractChoice(amount: amount, maxFee: maxFee, diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentScan.swift b/TalerWallet1/Views/Sheets/Payment/PaymentScan.swift @@ -231,8 +231,10 @@ struct PaymentView2: View, Sendable { ) } else { // TODO: Error - neither effective nor balanceDetails - Text("Error") - .talerFont(.body) + // actually this is shown when effective is not yet loaded for a brief moment + // - so don't show an error here +// Text("Error") +// .talerFont(.body) } } } diff --git a/TalerWallet1/Views/Transactions/PaidTransactionDetailV.swift b/TalerWallet1/Views/Transactions/PaidTransactionDetailV.swift @@ -42,7 +42,6 @@ struct PaidTransactionDetailV: View { totp } } -// Text(info.summary) if let info { // Text(info.merchant.name) TODO: show name & logo here? Text("Order-ID:") diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift @@ -121,13 +121,11 @@ struct ThreeAmountsSection: View { : WalletColors().transactionColor(incoming) let hasNoFees = noFees ?? false Section { - if let summary { -// if productImages.isEmpty { // otherwise we already have rendered the images - Text(summary) // and thus don't need a summary - .talerFont(.title3) - .padding(.bottom) -// } - } +// if let summary { +// Text(summary) +// .talerFont(.title3) +// .padding(.bottom) +// } if currency != "UNKNOWN" { if pendingDialog || isDone {