taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit a0134110ff68746513e86dbdaf7eaccfdc673be6
parent 2ea7639c7cdf5c18e8dd62f703d5589f7fbf0529
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 20 Aug 2026 19:19:35 +0200

AI: currencyRegex

Diffstat:
Mtaler-swift/Sources/taler-swift/Amount.swift | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/taler-swift/Sources/taler-swift/Amount.swift b/taler-swift/Sources/taler-swift/Amount.swift @@ -47,8 +47,8 @@ enum AmountError: Error { /// A value of some currency. public final class Amount: Codable, Hashable, @unchecked Sendable, CustomStringConvertible { // TODO: @unchecked - /// Format that a currency must match. - private static let currencyRegex = #"^[-_*A-Za-z0-9]{1,12}$"# + /// Format that a currency must match: at most 11 ASCII letters + private static let currencyRegex = #"^[A-Za-z]{1,11}$"# /// The largest possible value that can be represented. private static let maxValue: UInt64 = 1 << 52