taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 50b56535b55abb0ef172fd8921ef93de921c651a
parent 043fa214c0000b4a22e3e49d45e3fcd3d0f0581a
Author: Marc Stibane <marc@taler.net>
Date:   Wed, 25 Sep 2024 09:29:15 +0200

getMaxPeerPushDebitAmountM for available

Diffstat:
MTalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift @@ -270,11 +270,16 @@ struct SendAmountContent: View { if let balance { scopeInfo = balance.scopeInfo let currency = scopeInfo.currency - amountAvailable = balance.available amountToTransfer.setCurrency(currency) currencyInfo = controller.info(for: currency, controller.currencyTicker) currencyName = currencyInfo.scope.currency currencySymbol = currencyInfo.altUnitSymbol ?? currencyInfo.specs.name + do { + amountAvailable = try await model.getMaxPeerPushDebitAmountM(currency, scope: scopeInfo) + } catch { + // TODO: Error + amountAvailable = balance.available + } } } // .task(id: amountToTransfer.value) {