Refine payments formatting.

This commit is contained in:
Matthew Chen 2021-09-01 15:16:31 -03:00
parent 4a79019e83
commit d3633cc0c7
2 changed files with 10 additions and 3 deletions

View File

@ -35,9 +35,17 @@ public extension PaymentsFormat {
return numberFormatter
}
private static let mobFormatShort: NumberFormatter = {
buildMobFormatter(isShortForm: true)
}()
private static let mobFormatLong: NumberFormatter = {
buildMobFormatter(isShortForm: false)
}()
// Used for formatting MOB (not picoMob) values for display.
private static func mobFormat(isShortForm: Bool, locale: Locale? = nil) -> NumberFormatter {
buildMobFormatter(isShortForm: isShortForm, locale: locale)
private static func mobFormat(isShortForm: Bool) -> NumberFormatter {
isShortForm ? mobFormatShort : mobFormatLong
}
// Used for formatting decimal numbers in the

View File

@ -138,7 +138,6 @@ public class PaymentsImpl: NSObject, PaymentsSwift {
owsFailDebug("Missing countryCode: \(localNumber).")
return false
}
// return true
let validCountryCodes: [Int] = [
// France
33,