taler-ios

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

commit a5ea18d209b38afc3e2d035bb1d3d62b3617ed3e
parent 94c259ecc144266319ccefb954a6a559be42a090
Author: Marc Stibane <marc@taler.net>
Date:   Mon,  5 Oct 2026 08:34:07 +0200

task -> loadChoicesForPayment

Diffstat:
MTalerWallet1/Views/Transactions/PaymentTransactionView.swift | 13++++++++++++-
MTalerWallet1/Views/Transactions/TransactionTypeDetail.swift | 17+----------------
2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/TalerWallet1/Views/Transactions/PaymentTransactionView.swift b/TalerWallet1/Views/Transactions/PaymentTransactionView.swift @@ -122,7 +122,19 @@ struct PaymentTransactionView: View { #endif let details = paymentTransaction.details if common.isDialog { // show payment confirmation dialog + let state = common.txState MerchantHeader(terms: details.contractTerms) + .task(id: state.hashValue) { + let choicesTuple = controller.choicesTuple + let choicesForPayment = choicesTuple.1 + if choicesTuple.0 != common.transactionId || choicesForPayment == nil { + symLog.log("❗️❗️ task: \(state)") + await controller.loadChoicesForPayment(stack.push(), + txId: common.transactionId) + } else { + symLog.log("❗️❗️ choicesForPayment exists, no need for task: \(state)") + } + } let choicesTuple = controller.choicesTuple if let txId = choicesTuple.0, let choicesForPayment = choicesTuple.1 { @@ -158,7 +170,6 @@ struct PaymentTransactionView: View { let choice = choices[selectedChoice] let selectionDetail: ChoiceSelectionDetail = choice.0 // let contractChoice: ContractChoice = choice.1 - PaymentView2(stack: stack.push(), // TODO: details.info.merchant.name paid: false, raw: selectionDetail.amountRaw, diff --git a/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift b/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift @@ -156,22 +156,7 @@ struct TransactionTypeDetail: View { possible: $possible, payNow: $payNow, selectedChoice: $selectedChoice) - .task(id: common.txState.hashValue) { - let state = common.txState - if common.isDialog { - let choicesTuple = controller.choicesTuple - let choicesForPayment = choicesTuple.1 - if choicesTuple.0 != common.transactionId || choicesForPayment == nil { - symLog.log("❗️❗️ task: \(common.txState)") - await controller.loadChoicesForPayment(stack.push(), - txId: common.transactionId) - } else { - symLog.log("❗️❗️ choicesForPayment exists, no need for task: \(state)") - } - } else { - symLog.log("❗️❗️ \(common.type.rawValue), no need for task: \(state)") - } - } + case .refund(let refundTransaction): Group { let details = refundTransaction.details // TODO: more details, details.info?.merchant.name ThreeAmountsSheet(stack: stack.push(),