[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.
- [taler-taler-ios] 06/17: clientCancellationId, (continued)
- [taler-taler-ios] 06/17: clientCancellationId, gnunet, 2024/04/11
- [taler-taler-ios] 07/17: Laying the foundations of improved error handling, gnunet, 2024/04/11
- [taler-taler-ios] 04/17: emitObservabilityEvents, gnunet, 2024/04/11
- [taler-taler-ios] 05/17: symLog after quickjs.sendMessage returned, gnunet, 2024/04/11
- [taler-taler-ios] 01/17: rename setConfig, gnunet, 2024/04/11
- [taler-taler-ios] 11/17: Prepare notification error handling, gnunet, 2024/04/11
- [taler-taler-ios] 13/17: Fixes for error handling rebase, gnunet, 2024/04/11
- [taler-taler-ios] 09/17: Implement error handling all around (+refactoring), gnunet, 2024/04/11
- [taler-taler-ios] 08/17: Improve errors and move them to WalletModel, gnunet, 2024/04/11
- [taler-taler-ios] 15/17: cleanup, gnunet, 2024/04/11
- [taler-taler-ios] 14/17: catch WalletBackendError.walletCoreError,
gnunet <=
- [taler-taler-ios] 16/17: error handling, logging, gnunet, 2024/04/11
- [taler-taler-ios] 17/17: Bump version to 0.9.7 (1), gnunet, 2024/04/11
- [taler-taler-ios] 12/17: Centralize all error handling in the model, gnunet, 2024/04/11
- [taler-taler-ios] 10/17: Improvements to error dialog, gnunet, 2024/04/11