gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 14/17: catch WalletBackendError.walletCoreError


From: gnunet
Subject: [taler-taler-ios] 14/17: catch WalletBackendError.walletCoreError
Date: Thu, 11 Apr 2024 23:13:46 +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 eb30e3e528d1e42cd8b8b6a99149f96b25625732
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Apr 11 22:41:27 2024 +0200

    catch WalletBackendError.walletCoreError
---
 TalerWallet1/Views/Banking/ManualWithdraw.swift | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/TalerWallet1/Views/Banking/ManualWithdraw.swift 
b/TalerWallet1/Views/Banking/ManualWithdraw.swift
index 0b5552a..0499fc4 100644
--- a/TalerWallet1/Views/Banking/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Banking/ManualWithdraw.swift
@@ -126,15 +126,18 @@ struct ManualWithdraw: View {
                     do {
                         let details = try await 
model.getWithdrawalDetailsForAmountM(exchangeBaseUrl,
                                                                               
amount: amountToTransfer,
-                                                                      
cancellationId: "manual")
+                                                                      
cancellationId: "cancel",
+                                                                         
viewHandles: true)
                         withdrawalAmountDetails = details
 //                      agePicker.setAges(ages: 
withdrawalAmountDetails?.ageRestrictionOptions)
-//                    } catch WALLET_CORE_REQUEST_CANCELLED {
-                        // passing non-nil to clientCancellationId will throw 
WALLET_CORE_REQUEST_CANCELLED
-                        // when calling getWithdrawalDetailsForAmount again 
before the last call returned
-                        // since amountToTransfer changed and we don't need 
the old fee anymore
-                        // we just ignore it and do nothing.
-                    } catch {    // TODO: error
+                    } catch WalletBackendError.walletCoreError(let 
walletBackendResponseError) {
+                        symLog.log(walletBackendResponseError?.hint)
+                        // TODO: ignore WALLET_CORE_REQUEST_CANCELLED but 
handle all others
+                        // Passing non-nil to clientCancellationId will throw 
WALLET_CORE_REQUEST_CANCELLED
+                        // when calling getWithdrawalDetailsForAmount again 
before the last call returned.
+                        // Since amountToTransfer changed and we don't need 
the old fee anymore, we just
+                        // ignore it and do nothing.
+                    } catch {
                         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]