commit 63150d4080b73b92bc1b8da96fa6fb7639213d3f
parent c735cef0725981f1bae6274a072f0e555377e714
Author: Marc Stibane <marc@taler.net>
Date: Mon, 14 Oct 2024 23:08:12 +0200
amount too small is no error
Diffstat:
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/TalerWallet1/Views/Banking/QuiteSomeCoins.swift b/TalerWallet1/Views/Banking/QuiteSomeCoins.swift
@@ -71,7 +71,7 @@ struct QuiteSomeCoins: View {
let feeIsNegative: Bool
var body: some View {
- let isError = coinData.invalid || coinData.tooMany
+ let isError = coinData.tooMany // || coinData.invalid
let showFee = shouldShowFee && !isError
if showFee {
if let fee = coinData.fee {
diff --git a/TalerWallet1/Views/HelperViews/AmountInputV.swift b/TalerWallet1/Views/HelperViews/AmountInputV.swift
@@ -34,7 +34,7 @@ struct AmountInputV: View {
let stack: CallStack
@Binding var currencyInfo: CurrencyInfo
@Binding var amountAvailable: Amount
- let amountLabel: String
+ let amountLabel: String?
@Binding var amountToTransfer: Amount
let amountLastUsed: Amount
let wireFee: Amount?
@@ -86,8 +86,6 @@ struct AmountInputV: View {
var body: some View {
let currency = amountToTransfer.currencyStr
// let insufficientLabel = String(localized: "You don't have enough \(currency).")
- let available = amountAvailable.isZero ? nil
- : amountAvailable.formatted(currencyInfo, isNegative: false)
VStack(alignment: .trailing) {
// if summary.count > 0 {
// Text(summary)
@@ -111,7 +109,7 @@ struct AmountInputV: View {
shouldShowFee: true, // TODO: set to false if we never charge withdrawal fees
feeIsNegative: feeIsNegative)
let flags = checkAvailable(coinData)
- Button("Next") { buttonAction() }
+ Button(coinData.invalid ? "Amount too small" : "Next") { buttonAction() }
.buttonStyle(TalerButtonStyle(type: .prominent, disabled: flags.disabled))
.disabled(flags.disabled)
}.padding(.horizontal)