commit 9ab89b2e82a13e0e6e8369253590978ad3472764 parent 15318e9de14844a83155d0df8d353092ff53d8f6 Author: Marc Stibane <marc@taler.net> Date: Sun, 15 Feb 2026 10:03:25 +0100 Update Exchange Diffstat:
| M | TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift | | | 20 | ++++++++++++++++++++ |
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift b/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift @@ -20,6 +20,8 @@ struct ExchangeRowView: View { @EnvironmentObject private var controller: Controller @EnvironmentObject private var model: WalletModel @EnvironmentObject private var tabBarModel: TabBarModel + + @State private var isUpdated: Bool = false var body: some View { #if PRINT_CHANGES @@ -65,6 +67,24 @@ struct ExchangeRowView: View { Group { rowView .background(actions) + + if showDevelopItems { + HStack { + Text("Update Exchange") // VIEW_WITHDRAW_TOS + .foregroundStyle(isUpdated ? .gray : .primary) + } + .background { // only needed for .onTapGesture + Color.gray.opacity(INVISIBLE) + } + .onTapGesture { + if !isUpdated { + isUpdated = true + Task { + try await model.updateExchange(exchangeBaseUrl: baseURL, force: true) + } + } + } + } }.listRowSeparator(.hidden) } }