taler-ios

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

commit 10b927985213682ea539b44dc7b6fbefb746d3c3
parent 9729eecb9c94b25d25cad4a85c1260ae03be3a75
Author: Marc Stibane <marc@taler.net>
Date:   Thu,  4 Jan 2024 17:51:18 +0100

Withdraw only once

Diffstat:
MTalerWallet1/Views/Exchange/ManualWithdrawDone.swift | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift b/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift @@ -51,12 +51,14 @@ struct ManualWithdrawDone: View { symLog.log("onAppear") DebugViewC.shared.setViewID(VIEW_WITHDRAW_ACCEPT, stack: stack.push()) }.task { - do { - let result = try await model.sendAcceptManualWithdrawalM(exchange.exchangeBaseUrl, - amount: amountToTransfer, restrictAge: 0) - transactionId = result!.transactionId - } catch { // TODO: error - symLog.log(error.localizedDescription) + if transactionId == nil { + do { + let result = try await model.sendAcceptManualWithdrawalM(exchange.exchangeBaseUrl, + amount: amountToTransfer, restrictAge: 0) + transactionId = result!.transactionId + } catch { // TODO: error + symLog.log(error.localizedDescription) + } } } }