commit feafc277eb461110be4e956ef8265090b0bc2f1b
parent 8e42aff122ce62566d954815d7d2fa95184a851e
Author: Marc Stibane <marc@taler.net>
Date: Fri, 12 Dec 2025 08:20:23 +0100
update scanned tx after server connection
Diffstat:
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift b/TalerWallet1/Views/Sheets/Payment/PayTemplateV.swift
@@ -93,6 +93,9 @@ struct PayTemplateV: View {
/// checkPayForTemplate does not provide fees (yet)
let contract = details.templateContract // specifies fixed amount/summary
+ if let amount = contract.amount {
+ controller.updateAmount(amount, forSaved: url)
+ }
amountIsEditable = contract.amount == nil
summaryIsEditable = contract.summary == nil
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
@@ -123,13 +123,16 @@ struct PaymentView: View, Sendable {
summary: summaryIsEditable ? summary : nil) {
await checkCurrencyInfo(for: templateResponse)
preparePayResult = templateResponse
+ let raw = templateResponse.amountRaw
+ controller.updateAmount(raw, forSaved: url)
}
} else {
if let payResponse = try? await model.preparePayForUri(url.absoluteString) {
let raw = payResponse.amountRaw
- amountToTransfer = raw
+ amountToTransfer = raw
await checkCurrencyInfo(for: payResponse)
preparePayResult = payResponse
+ controller.updateAmount(raw, forSaved: url)
}
}
}
diff --git a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
@@ -30,6 +30,7 @@ struct WithdrawExchangeV: View {
symLog.log(".task")
if let withdrawExchange = try? await model.prepareWithdrawExchange(url.absoluteString) {
let baseUrl = withdrawExchange.exchangeBaseUrl
+ controller.updateBase(baseUrl, forSaved: url)
symLog.log("getExchangeByUrl(\(baseUrl))")
if let exc = try? await model.getExchangeByUrl(url: baseUrl) {
// let the controller collect CurrencyInfo from this formerly unknown exchange