commit e81152824d17fe3d3c12999a90588fa3bfd21959
parent 634b9e7bd75b344227b471b642ce8d0e41b07021
Author: Marc Stibane <marc@taler.net>
Date: Mon, 28 Apr 2025 07:34:49 +0200
available
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountV.swift
@@ -132,10 +132,14 @@ struct SendAmountV: View {
.overlay {
if #available(iOS 16.4, *) {
if controller.oimModeActive {
+ let available = !amountAvailable.isZero ? amountAvailable
+ : balance?.available ??
+ selectedBalance?.available ??
+ amountAvailable
OIMEditView(stack: stack.push(),
cash: cash,
amount: $amountToTransfer,
- available: $amountAvailable,
+ available: available,
useAvailable: true, // cannot send more than we have
fwdButtonTapped: $buttonSelected)
.environmentObject(NamespaceWrapper(namespace)) // keep OIMviews apart
diff --git a/TalerWallet1/Views/OIM/OIMView.swift b/TalerWallet1/Views/OIM/OIMView.swift
@@ -215,7 +215,7 @@ struct OIMEditView: View {
let stack: CallStack
let cash: OIMcash
@Binding var amount: Amount
- @Binding var available: Amount
+ let available: Amount
let useAvailable : Bool // if false then we're requesting money and don't use available
// let decimal: Int // 0 for ¥,HUF; 2 for $,€,£; 3 for ﷼,₯ (arabic)
@Binding var fwdButtonTapped: Bool