taler-ios

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

commit 80e43e75337111da398bc5befbd160ef51ffba1f
parent 76c5517bbdf95550576b913a0897bc925bd4b4df
Author: Marc Stibane <marc@taler.net>
Date:   Wed, 23 Jul 2025 06:29:50 +0200

currencyStr

Diffstat:
MTalerWallet1/Views/OIM/OIMEditView.swift | 2+-
MTalerWallet1/Views/OIM/OIMSubjectView.swift | 2+-
MTalerWallet1/Views/OIM/OIMcurrency.swift | 12++++++------
MTalerWallet1/Views/OIM/OIMp2pReceiveView.swift | 2+-
MTalerWallet1/Views/OIM/OIMviews.swift | 4++--
5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/TalerWallet1/Views/OIM/OIMEditView.swift b/TalerWallet1/Views/OIM/OIMEditView.swift @@ -80,7 +80,7 @@ struct OIMEditView: View { // let _ = print(">>> OIMEditView", available, amount, stack.peek()?.file) OIMnavBack(stack: stack.push(), - currencyName: cash.currency.currency, + currencyName: cash.currency.currencyStr, chest: cash.currency.chest, isFinal: false, isSending: sending, diff --git a/TalerWallet1/Views/OIM/OIMSubjectView.swift b/TalerWallet1/Views/OIM/OIMSubjectView.swift @@ -84,7 +84,7 @@ struct OIMSubjectView: View { let gotAction = (selectedGoal != nil) ? sendAction : nil OIMnavBack(stack: stack.push(), - currencyName: currency.currency, + currencyName: currency.currencyStr, chest: currency.chest, isFinal: false, isSending: sending, diff --git a/TalerWallet1/Views/OIM/OIMcurrency.swift b/TalerWallet1/Views/OIM/OIMcurrency.swift @@ -26,34 +26,34 @@ public let OIMeuros = OIMcurrency(bankNotes: [20000, 10000, 5000, 2000, 1000, 5 bankCoins: [200, 100, 50, 20, 10, 5, 2, 1], coinSizes: [258, 232, 242, 222, 198, 212, 188, 162], noteBase: "EUR", coinBase: "eur", - currency: "EUR", chest: "EUR") + currencyStr: "EUR", chest: "EUR") // 5 banknotes, 7 coins (no fractionals) public let OIMxofN = OIMcurrency(bankNotes: [10000, 5000, 2000, 1000, 500], bankCoins: [200, 100, 50, 25, 10, 5, 1], coinSizes: [180, 207, 174, 207, 175, 150, 131], noteBase: "XOFn", coinBase: "xof", - currency: "CFA", chest: "CdI") + currencyStr: "CFA", chest: "CdI") // 4 banknotes, 8 coins (no fractionals) public let OIMxofC = OIMcurrency(bankNotes: [10000, 5000, 2000, 1000], bankCoins: [500, 200, 100, 50, 25, 10, 5, 1], coinSizes: [200, 180, 207, 174, 207, 175, 150, 131], noteBase: "XOFn", coinBase: "xof", - currency: "CFA", chest: "CdI") + currencyStr: "CFA", chest: "CdI") // 1 stack, 5 banknotes, 5 coins (all fractionals) public let OIMleones = OIMcurrency(bankNotes: [ 10000, 2000, 1000, 500, 200, 100], bankCoins: [ 50, 10, 5, 1], coinSizes: [270, 240, 228, 208], // [ 260mm 270px, 240mm 250px, 230mm 240px, 225mm 228px, 200mm 208px] noteBase: "SLE", coinBase: "sle", - currency: "SLE", chest: "SLE") + currencyStr: "SLE", chest: "SLE") // 6 banknotes, 6 coins of which 5 are fractionals < 100 public let OIMdollars = OIMcurrency(bankNotes: [10000, 5000, 2000, 1000, 500, 200], // XXX x 265 bankCoins: [100, 50, 25, 10, 5, 1], coinSizes: [265, 306, 243, 180, 212, 190], noteBase: "USD", coinBase: "usd", - currency: "USD", chest: "DEU") + currencyStr: "USD", chest: "DEU") // MARK: - public struct OIMcurrency: Sendable { let bankNotes: OIMdenominations // values of each banknote, in cents, descending @@ -61,7 +61,7 @@ public struct OIMcurrency: Sendable { let coinSizes: [CGFloat] // coin sizes let noteBase: String let coinBase: String - let currency: String + let currencyStr: String let chest: String func coinSize(_ value: UInt64) -> CGFloat? { diff --git a/TalerWallet1/Views/OIM/OIMp2pReceiveView.swift b/TalerWallet1/Views/OIM/OIMp2pReceiveView.swift @@ -27,7 +27,7 @@ struct OIMp2pReceiveView: View { // let _ = Self._printChanges() let currency = cash.currency OIMnavBack(stack: stack.push(), - currencyName: currency.currency, + currencyName: currency.currencyStr, chest: currency.chest, isFinal: false, isSending: false, diff --git a/TalerWallet1/Views/OIM/OIMviews.swift b/TalerWallet1/Views/OIM/OIMviews.swift @@ -85,12 +85,12 @@ struct OIMtitleView: View { Spacer() } // balance - OIMamountV(amount: amount, currencyName: cash.currency.currency) + OIMamountV(amount: amount, currencyName: cash.currency.currencyStr) if !history { if let secondAmount { Spacer() // amountToSend - OIMamountV(amount: secondAmount, currencyName: cash.currency.currency) + OIMamountV(amount: secondAmount, currencyName: cash.currency.currencyStr) } // invisible - source for money (target) flying out of and back in the open chest OIMactionButton(type: .sendP2P, isFinal: false, action: nil)