summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Stibane <marc@taler.net>2024-04-11 22:41:27 +0200
committerMarc Stibane <marc@taler.net>2024-04-11 22:44:33 +0200
commiteb30e3e528d1e42cd8b8b6a99149f96b25625732 (patch)
tree7321b5dd92e75444f7989fa4f32b0ba8e38995a1
parent08a200e6c93f7e5bca497737cdebce76c2ca3e51 (diff)
downloadtaler-ios-eb30e3e528d1e42cd8b8b6a99149f96b25625732.tar.gz
taler-ios-eb30e3e528d1e42cd8b8b6a99149f96b25625732.tar.bz2
taler-ios-eb30e3e528d1e42cd8b8b6a99149f96b25625732.zip
catch WalletBackendError.walletCoreError
-rw-r--r--TalerWallet1/Views/Banking/ManualWithdraw.swift17
1 files 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
}