taler-ios

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

commit 6899f8c0e5bf50e76e560dd4361eee3fd6763142
parent 3c704b6642e21ca3f47843f9f55f2f730c916505
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 21 Nov 2024 21:58:05 +0100

products

Diffstat:
MTalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift | 3++-
MTalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift | 3++-
MTalerWallet1/Views/Sheets/Payment/PaymentView.swift | 6++++--
MTalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift | 3++-
MTalerWallet1/Views/Transactions/ThreeAmountsSection.swift | 4+++-
5 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift @@ -57,7 +57,8 @@ struct P2pPayURIView: View { baseURL: nil, txStateLcl: nil, summary: peerPullDebitResponse.contractTerms.summary, - merchant: nil) + merchant: nil, + products: nil) let expiration = peerPullDebitResponse.contractTerms.purse_expiration let (dateString, date) = TalerDater.dateString(expiration, minimalistic) let a11yDate = TalerDater.accessibilityDate(date) ?? dateString diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift @@ -78,7 +78,8 @@ struct P2pReceiveURIView: View { baseURL: nil, txStateLcl: nil, summary: peerPushCreditResponse.contractTerms.summary, - merchant: nil) + merchant: nil, + products: nil) let expiration = peerPushCreditResponse.contractTerms.purse_expiration let (dateString, date) = TalerDater.dateString(expiration, minimalistic) let a11yDate = TalerDater.accessibilityDate(date) ?? dateString diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift @@ -183,7 +183,8 @@ struct PaymentView: View, Sendable { baseURL: baseURL, txStateLcl: nil, summary: terms.summary, - merchant: terms.merchant.name) + merchant: terms.merchant.name, + products: terms.products) // TODO: payment: popup with all possible exchanges, check fees } else if let balanceDetails = preparePayResult.balanceDetails { // Insufficient Text("You don't have enough \(currency).") @@ -205,7 +206,8 @@ struct PaymentView: View, Sendable { baseURL: baseURL, txStateLcl: nil, summary: terms.summary, - merchant: terms.merchant.name) + merchant: terms.merchant.name, + products: terms.products) } else { // TODO: Error - neither effective nor balanceDetails Text("Error") diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift @@ -88,7 +88,8 @@ struct WithdrawAcceptView: View { baseURL: exchange.exchangeBaseUrl, txStateLcl: nil, // common.txState.major.localizedState summary: nil, - merchant: nil) + merchant: nil, + products: nil) if let wireFee { if !wireFee.isZero { let currencyInfo = controller.info(for: scope, controller.currencyTicker) diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift @@ -66,7 +66,8 @@ struct ThreeAmountsSheet: View { // should be in a separate file baseURL: baseURL, txStateLcl: txStateLcl, summary: summary, - merchant: merchant) + merchant: merchant, + products: nil) } } // MARK: - @@ -89,6 +90,7 @@ struct ThreeAmountsSection: View { let txStateLcl: String? // localizedState let summary: String? let merchant: String? + let products: [Product]? @Environment(\.colorScheme) private var colorScheme @Environment(\.colorSchemeContrast) private var colorSchemeContrast