commit 6605eb3cc30c12977417f75fb701d80e3061881e
parent 4911a5e9a13c9596f2bf42bbcb4cc0801d815a80
Author: Marc Stibane <marc@taler.net>
Date: Fri, 10 Jul 2026 15:23:37 +0200
Don't show 3 amounts for UNKNOWN
Diffstat:
1 file changed, 54 insertions(+), 52 deletions(-)
diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift
@@ -182,61 +182,63 @@ struct ThreeAmountsSection: View {
}
}
- if pendingDialog || isDone {
- Text(pendingDialog ? "Payment will be made in \(currency)"
- : "Payment was made in \(currency)")
- .talerFont(.callout)
- .padding(.top, 4)
- }
- AmountRowV(stack: stack.push(),
- title: minimalistic ? topAbbrev : topTitle,
- amount: topAmount,
- scope: scope,
- isNegative: nil,
- color: labelColor,
- large: false)
- .padding(.bottom, 4)
- if hasNoFees == false { // otherwise raw==effective
- if let fee {
- let title = minimalistic ? String(localized: "Exchange fee (short):", defaultValue: "Fee:", comment: "short version")
- : String(localized: "Exchange fee (long):", defaultValue: "Fee:", comment: "long version")
- AmountRowV(stack: stack.push(),
- title: title,
- amount: fee,
- scope: scope,
- isNegative: fee.isZero ? nil : feeIsNegative,
- color: labelColor,
- large: false)
- .padding(.bottom, 4)
+ if currency != "UNKNOWN" {
+ if pendingDialog || isDone {
+ Text(pendingDialog ? "Payment will be made in \(currency)"
+ : "Payment was made in \(currency)")
+ .talerFont(.callout)
+ .padding(.top, 4)
}
- if let bottomAmount {
- AmountRowV(stack: stack.push(),
- title: minimalistic ? bottomAbbrev : bottomTitle,
- amount: bottomAmount,
- scope: scope,
- isNegative: nil,
- color: bottomColor,
- large: large)
+ AmountRowV(stack: stack.push(),
+ title: minimalistic ? topAbbrev : topTitle,
+ amount: topAmount,
+ scope: scope,
+ isNegative: nil,
+ color: labelColor,
+ large: false)
+ .padding(.bottom, 4)
+ if hasNoFees == false { // otherwise raw==effective
+ if let fee {
+ let title = minimalistic ? String(localized: "Exchange fee (short):", defaultValue: "Fee:", comment: "short version")
+ : String(localized: "Exchange fee (long):", defaultValue: "Fee:", comment: "long version")
+ AmountRowV(stack: stack.push(),
+ title: title,
+ amount: fee,
+ scope: scope,
+ isNegative: fee.isZero ? nil : feeIsNegative,
+ color: labelColor,
+ large: false)
+ .padding(.bottom, 4)
+ }
+ if let bottomAmount {
+ AmountRowV(stack: stack.push(),
+ title: minimalistic ? bottomAbbrev : bottomTitle,
+ amount: bottomAmount,
+ scope: scope,
+ isNegative: nil,
+ color: bottomColor,
+ large: large)
+ }
}
- }
- let serviceURL = scope?.url ?? baseURL
- if let serviceURL {
- VStack(alignment: .leading) {
- // TODO: "Issued by" for withdrawals
- Text(minimalistic ? "Payment service:" : "Using payment service:")
- .multilineTextAlignment(.leading)
- .talerFont(.body)
- Text(serviceURL.trimURL)
- .frame(maxWidth: .infinity, alignment: .trailing)
- .multilineTextAlignment(.center)
- .talerFont(large ? .title3 : .body)
-// .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
- .foregroundColor(labelColor)
+ let serviceURL = scope?.url ?? baseURL
+ if let serviceURL {
+ VStack(alignment: .leading) {
+ // TODO: "Issued by" for withdrawals
+ Text(minimalistic ? "Payment service:" : "Using payment service:")
+ .multilineTextAlignment(.leading)
+ .talerFont(.body)
+ Text(serviceURL.trimURL)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+ .multilineTextAlignment(.center)
+ .talerFont(large ? .title3 : .body)
+// .fontWeight(large ? .medium : .regular) // @available(iOS 16.0, *)
+ .foregroundColor(labelColor)
+ }
+ .padding(.top, 4)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .listRowSeparator(.hidden)
+ .accessibilityElement(children: .combine)
}
- .padding(.top, 4)
- .frame(maxWidth: .infinity, alignment: .leading)
- .listRowSeparator(.hidden)
- .accessibilityElement(children: .combine)
}
} header: {
let header = scope?.url?.trimURL ?? scope?.currency ?? summary != nil ? "Summary" : nil