commit eb30e3e528d1e42cd8b8b6a99149f96b25625732 parent 08a200e6c93f7e5bca497737cdebce76c2ca3e51 Author: Marc Stibane <marc@taler.net> Date: Thu, 11 Apr 2024 22:41:27 +0200 catch WalletBackendError.walletCoreError Diffstat:
| M | 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 @@ -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 }