commit 92e4817d1119532b9f2810a5ca7fa1e8b12fc0f1
parent 4215142acfba54f7ed4ff6e066636db0522fd1c9
Author: Marc Stibane <marc@taler.net>
Date: Fri, 17 Jul 2026 11:52:17 +0200
prepareBankIntegratedWithdrawal
Diffstat:
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/TalerWallet1/Model/Model+Withdraw.swift b/TalerWallet1/Model/Model+Withdraw.swift
@@ -64,7 +64,7 @@ enum WithdrawalOperationStatus: String, Codable {
case aborted
case confirmed
}
-/// The result from getWithdrawalDetailsForUri
+/// The result from prepareBankIntegratedWithdrawal
struct WithdrawUriInfoResponse: Decodable {
var operationId: String
var status: WithdrawalOperationStatus // pending, selected, aborted, confirmed
@@ -78,10 +78,16 @@ struct WithdrawUriInfoResponse: Decodable {
var editableExchange: Bool // TODO: what for?
var possibleExchanges: [Exchange] // TODO: query these for fees?
}
+
+struct PrepareBankIntegratedWithdrawalResponse: Decodable {
+ var transactionId: String
+ var info: WithdrawUriInfoResponse
+}
+
/// A request to get an exchange's withdrawal details.
-fileprivate struct GetWithdrawalDetailsForURI: WalletBackendFormattedRequest {
- typealias Response = WithdrawUriInfoResponse
- func operation() -> String { "getWithdrawalDetailsForUri" }
+fileprivate struct PrepareBankIntegratedWithdrawal: WalletBackendFormattedRequest {
+ typealias Response = PrepareBankIntegratedWithdrawalResponse
+ func operation() -> String { "prepareBankIntegratedWithdrawal" }
func args() -> Args { Args(talerWithdrawUri: talerUri) }
var talerUri: String
diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -102,7 +102,9 @@ struct WithdrawURIView: View {
private func viewDidLoad() async {
symLog.log(".task")
do {
- let uriInfoResponse = try await model.getWithdrawalDetailsForUri(url.absoluteString)
+ let response = try await model.prepareBankIntegratedWithdrawal(url.absoluteString)
+ let txId = response.transactionId
+ let uriInfoResponse = response.info
let amount = uriInfoResponse.amount
let currency = amount?.currencyStr ?? uriInfoResponse.currency
amountToTransfer = amount ?? Amount.zero(currency: currency)