commit b974a783707ac51303598e6c34253b1e04f55e16
parent 7597c08679d4e8db97c829ad84ac0b0bcd2e0a43
Author: Marc Stibane <marc@taler.net>
Date: Wed, 11 Sep 2024 12:58:08 +0200
debug
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/AmountInputV.swift b/TalerWallet1/Views/HelperViews/AmountInputV.swift
@@ -77,6 +77,7 @@ struct AmountInputV: View {
return Flags(insufficient: insufficient, disabled: disabled)
} catch {
// TODO: error Amounts don't match
+ symLog.log("❗️Cannot compare amountAvailable.\(amountAvailable.currencyStr) to amountToTransfer.\(amountToTransfer.currencyStr))")
}
}
return Flags(insufficient: false, disabled: isZero)
diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift
@@ -32,6 +32,7 @@ struct ShortcutButton: View {
do {
return try available < shortie
} catch {
+ print("❗️Cannot compare available.\(available.currencyStr) to shortie.\(shortie.currencyStr))")
return true
}
}
@@ -39,6 +40,10 @@ struct ShortcutButton: View {
}
var body: some View {
+#if PRINT_CHANGES
+ let _ = Self._printChanges()
+// let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear
+#endif
let shortie = Amount(currency: currency, cent: UInt64(shortcut)) // TODO: adapt for ¥
let title = shortie.formatted(currencyInfo, isNegative: false)
let shortcutLabel = String(localized: "Shortcut", comment: "VoiceOver: $50,$25,$10,$5 shortcut buttons")
@@ -80,6 +85,10 @@ struct CurrencyInputView: View {
}
var body: some View {
+#if PRINT_CHANGES
+ let _ = Self._printChanges()
+// let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear
+#endif
let currency = amount.currencyStr
let currencyField = CurrencyField($currencyInfo, amount: $amount)
VStack (alignment: .center) { // center shortcut buttons