diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift index ab70daf8..4fe4fc50 100644 --- a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift +++ b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift @@ -186,7 +186,24 @@ struct ThreeAmountsSection: View { } } } header: { - let header = scope?.url?.trimURL ?? scope?.currency ?? (summary != nil ? "Summary" : nil) + // The payment service is named ONCE on this screen. + // + // The section's content ends with "Using payment service:" and + // the host (:168-185), and this header took the same host from + // the same `scope?.url`. So a withdrawal's detail screen showed + // `taler-ops.ch` twice, about 300 pt apart: once as a bare + // header with nothing to say what it is, and once as a labelled + // value. Measured across the harness's captures: 707 recorded + // screens on `Withdrawal`, `Wire Transfer`, `Authorize at Bank` + // and `Money Received` carry the pair. + // + // The labelled copy is the one that explains itself, so the + // header falls through to its next alternative -- the currency + // -- exactly as it already does when the scope has no URL. + let namedBelow = (scope?.url ?? baseURL) != nil + let fromScope: String? = namedBelow ? nil : scope?.url?.trimURL + let header = fromScope ?? scope?.currency + ?? (summary != nil ? "Summary" : nil) if let header { Text(header) .talerFont(.title3)