gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 05/11: Only call DetailsForAmount if non-zero


From: gnunet
Subject: [taler-taler-ios] 05/11: Only call DetailsForAmount if non-zero
Date: Tue, 24 Oct 2023 22:45:21 +0200

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 846c8212f95e617d081671f5b8717f41958b7e47
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Oct 24 16:45:14 2023 +0200

    Only call DetailsForAmount if non-zero
---
 TalerWallet1/Views/Exchange/ManualWithdraw.swift | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift 
b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
index 78356be..0492c95 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -81,13 +81,15 @@ struct ManualWithdraw: View {
             DebugViewC.shared.setViewID(VIEW_WITHDRAWAL, stack: stack.push())
         }
         .task(id: centsToTransfer) { // re-run this whenever centsToTransfer 
changes
-            let amount = Amount.amountFromCents(currency, centsToTransfer)
-            do {
-                withdrawalAmountDetails = try await 
model.loadWithdrawalDetailsForAmountM(exchange.exchangeBaseUrl, amount: amount)
-//                agePicker.setAges(ages: 
withdrawalAmountDetails?.ageRestrictionOptions)
-            } catch {    // TODO: error
-                symLog.log(error.localizedDescription)
-                withdrawalAmountDetails = nil
+            if centsToTransfer > 0 {
+                let amount = Amount.amountFromCents(currency, centsToTransfer)
+                do {
+                    withdrawalAmountDetails = try await 
model.loadWithdrawalDetailsForAmountM(exchange.exchangeBaseUrl, amount: amount)
+//                  agePicker.setAges(ages: 
withdrawalAmountDetails?.ageRestrictionOptions)
+                } catch {    // TODO: error
+                    symLog.log(error.localizedDescription)
+                    withdrawalAmountDetails = nil
+                }
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]