taler-ios

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

commit fb56290300837674f772637b5d3609e41fbc84d1
parent e6a549b1b054ce2bcb1f63f051ca61a15cc2c787
Author: Marc Stibane <marc@taler.net>
Date:   Fri, 12 Dec 2025 08:47:32 +0100

getExchangeByUrl does NOT query the exchange via network

Diffstat:
MTalerWallet1/Views/Sheets/Payment/PaymentView.swift | 25+++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift @@ -101,16 +101,21 @@ struct PaymentView: View, Sendable { } } // else fallback to contractTerms.exchanges - let exchanges = result.contractTerms.exchanges - for exchange in exchanges { - let baseUrl = exchange.url - if let someExchange = try? await model.getExchangeByUrl(url: baseUrl) { - symLog.log("\(baseUrl.trimURL) loaded") - await controller.checkCurrencyInfo(for: baseUrl, model: model) - symLog.log("Info(for: \(baseUrl.trimURL) loaded") - return - } - } + // TODO: wallet-core should return status==UnknownCurrency. When we get that, + // we should let the user decide whether they want info about that +// let exchanges = result.contractTerms.exchanges +// for exchange in exchanges { +// let baseUrl = exchange.url + // Yikes - getExchangeByUrl does NOT query the exchange via network, + // but returns "exchange entry not found in wallet database" + // so it doesn't make sense to call it here +// if let someExchange = try? await model.getExchangeByUrl(url: baseUrl) { +// symLog.log("\(baseUrl.trimURL) loaded") +// await controller.checkCurrencyInfo(for: baseUrl, model: model) +// symLog.log("Info(for: \(baseUrl.trimURL) loaded") +// return +// } +// } symLog.log("Couldn't load Info(for: \(result.amountRaw.currencyStr))") }