commit b05e257697b621b7b2145ebb7c5e128370ea4d83
parent 0ba8f3ac71b74569280853bf185843a2ebe3df10
Author: Marc Stibane <marc@taler.net>
Date: Sat, 22 Aug 2026 08:56:53 +0200
Fee
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentScan.swift b/TalerWallet1/Views/Sheets/Payment/PaymentScan.swift
@@ -162,7 +162,8 @@ struct PaymentView2: View, Sendable {
func computeFee(raw: Amount?, eff: Amount?) -> Amount? {
if let raw, let eff {
- return try! Amount.diff(raw, eff) // TODO: different currencies
+ // fee can only be computed if raw and eff are the same currency
+ return try? Amount.diff(raw, eff)
}
return nil
}