[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 17/32: currency formatter
From: |
gnunet |
Subject: |
[taler-taler-ios] 17/32: currency formatter |
Date: |
Sat, 10 Feb 2024 15:04:43 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit c828ee8414fa3040d42c539687e123f438f80b9f
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Feb 4 15:23:55 2024 +0100
currency formatter
---
TalerWallet1/Views/HelperViews/QRCodeDetailView.swift | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
index 0a2dcfc..14adf50 100644
--- a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
+++ b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift
@@ -12,6 +12,15 @@ struct QRCodeDetailView: View {
let incoming: Bool
let amount: Amount
+ @EnvironmentObject private var controller: Controller
+
+ var amountStr: String {
+ if let currencyInfo = controller.info(for: amount.currencyStr) {
+ return amount.string(currencyInfo)
+ }
+ return amount.readableDescription
+ }
+
var body: some View {
if talerURI.count > 10 {
Section {
@@ -42,7 +51,6 @@ struct QRCodeDetailView: View {
}
.listRowSeparator(.hidden)
- let amountStr = amount.readableDescription // TODO:
currency formatter?
let hintStr = incoming ? String(localized: "let the payer scan
this QR code to pay \(amountStr).",
comment: "e.g. '5,3 €'")
: String(localized: "let the payee scan
this QR code to receive \(amountStr).",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 03/32: Settings, About, (continued)
- [taler-taler-ios] 03/32: Settings, About, gnunet, 2024/02/10
- [taler-taler-ios] 07/32: PaymentDone, gnunet, 2024/02/10
- [taler-taler-ios] 02/32: TransactionSummaryV, gnunet, 2024/02/10
- [taler-taler-ios] 16/32: wording, gnunet, 2024/02/10
- [taler-taler-ios] 06/32: Cleanup, logging, gnunet, 2024/02/10
- [taler-taler-ios] 20/32: wording, gnunet, 2024/02/10
- [taler-taler-ios] 04/32: Fake Euro, gnunet, 2024/02/10
- [taler-taler-ios] 27/32: don't dismiss after done, gnunet, 2024/02/10
- [taler-taler-ios] 13/32: ScrollVStack, gnunet, 2024/02/10
- [taler-taler-ios] 21/32: minimalistic, gnunet, 2024/02/10
- [taler-taler-ios] 17/32: currency formatter,
gnunet <=
- [taler-taler-ios] 14/32: shouldReloadBalances, gnunet, 2024/02/10
- [taler-taler-ios] 26/32: more scopeInfo, gnunet, 2024/02/10
- [taler-taler-ios] 30/32: Bump version to 0.9.4 (3), gnunet, 2024/02/10
- [taler-taler-ios] 18/32: Dismiss P2P without showing details again, gnunet, 2024/02/10
- [taler-taler-ios] 32/32: remove reward, gnunet, 2024/02/10
- [taler-taler-ios] 31/32: Wording, gnunet, 2024/02/10
- [taler-taler-ios] 12/32: devExperiment Refresh, gnunet, 2024/02/10
- [taler-taler-ios] 11/32: Identifiable, gnunet, 2024/02/10
- [taler-taler-ios] 28/32: RotatingTaler while waiting for tx to finish, gnunet, 2024/02/10
- [taler-taler-ios] 23/32: TransactionDetailV, gnunet, 2024/02/10