commit f883fa4b21f0aa9927713e4782a3dfbd08cbfaed
parent 3829c37684c59a3f2cc8a57b7f311fdfc370adf0
Author: Marc Stibane <marc@taler.net>
Date: Fri, 17 Jul 2026 08:32:02 +0200
chosen option
Diffstat:
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift
@@ -505,6 +505,7 @@ struct PaymentTransactionDetails: Decodable {
var posConfirmationDeadline: Timestamp?
var posConfirmationViaNfc: Bool?
let contractTerms: MerchantContractTerms? // TODO: show data in tx details
+ let choiceIndex: Int?
let repurchaseTransactionId: String?
let abortReason: WalletBackendAbortReason?
}
diff --git a/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift b/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift
@@ -77,6 +77,16 @@ struct TransactionPayDetailV: View {
}
}
}
+ if let choiceIndex = details.choiceIndex {
+ if let contractTerms = details.contractTerms {
+ if let choices = contractTerms.choices,
+ choices.indices.contains(choiceIndex) {
+ let choice = choices[choiceIndex]
+// Text(choice.text)
+
+ }
+ }
+ }
}
if let products = info?.products {
ForEach(products) { product in
diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift
@@ -413,6 +413,7 @@ extension TalerTransaction { // for PreViews
refunds: [],
refundQueryActive: false,
contractTerms: nil,
+ choiceIndex: nil,
repurchaseTransactionId: nil,
abortReason: nil)
self = .payment(PaymentTransaction(common: common, details: pDetails))