commit 8b2b50780ad417cfcfa5833b7d471e344430540a
parent 37029e03d4cac1c5dcf9333059acf7bf4cbc4b42
Author: Marc Stibane <marc@taler.net>
Date: Thu, 16 Jul 2026 09:30:15 +0200
cleanup, use CHF for TESTKUDOS if oimEuro
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/TalerWallet1/Views/OIM/OIMcurrency.swift b/TalerWallet1/Views/OIM/OIMcurrency.swift
@@ -15,14 +15,13 @@ public let OIMcurrencies = [OIMeuros, OIMleones, OIMxofN, OIMfrancs]
func oimCurrency(_ scopeInfo: ScopeInfo?, oimEuro: Bool) -> OIMcurrency {
let currency = scopeInfo?.currency
if currency == DEMOCURRENCY { // map KUDOS to Leones
- if oimEuro { return OIMcurrencies[0] }
- return OIMcurrencies[1]
+ return oimEuro ? OIMeuros : OIMleones
} else if currency == TESTCURRENCY { // map TESTKUDOS to CFA
- return OIMcurrencies[2]
+ return oimEuro ? OIMfrancs : OIMxofN
} else if currency == "CHF" {
- return OIMcurrencies[3]
+ return OIMfrancs
}
- return OIMcurrencies[0] // fall back to Euros
+ return OIMeuros // fall back to Euros
}