gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 02/69: LoadingView


From: gnunet
Subject: [taler-taler-ios] 02/69: LoadingView
Date: Fri, 19 Jan 2024 09:01:35 +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 2387c4f4627d3ce7fc22d61beceb67573ea677b4
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Dec 8 18:13:51 2023 +0100

    LoadingView
---
 TalerWallet.xcodeproj/project.pbxproj              |  6 ---
 TalerWallet1/Views/Exchange/ManualWithdraw.swift   |  3 +-
 .../Views/Exchange/ManualWithdrawDone.swift        |  3 +-
 TalerWallet1/Views/HelperViews/LoadingView.swift   | 43 ++++++++++++++----
 TalerWallet1/Views/Peer2peer/P2PReadyV.swift       |  2 +-
 .../Views/Sheets/P2P_Sheets/P2pPayURIView.swift    | 22 ++++-----
 .../Sheets/P2P_Sheets/P2pReceiveURIView.swift      |  4 +-
 .../Views/Sheets/Payment/PayTemplateView.swift     |  4 +-
 .../Views/Sheets/Payment/PaymentView.swift         |  4 +-
 .../Views/Sheets/Refund/RefundURIView.swift        |  4 +-
 .../WithdrawAcceptDone.swift                       |  4 +-
 .../WithdrawProgressView.swift                     | 32 -------------
 .../WithdrawBankIntegrated/WithdrawTOSView.swift   | 53 ++++++++++------------
 .../WithdrawBankIntegrated/WithdrawURIView.swift   |  7 +--
 TalerWallet1/Views/Sheets/WithdrawExchangeV.swift  |  3 +-
 15 files changed, 81 insertions(+), 113 deletions(-)

diff --git a/TalerWallet.xcodeproj/project.pbxproj 
b/TalerWallet.xcodeproj/project.pbxproj
index 4f20685..f8fc054 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -85,7 +85,6 @@
                4E3EAE5B2A990778009F1BE8 /* View+Notification.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 4E3B4BC62A429F2A00CC88B8 /* 
View+Notification.swift */; };
                4E3EAE5C2A990778009F1BE8 /* Model+Pending.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4EB0954C2989CBFE0043A8A1 /* Model+Pending.swift 
*/; };
                4E3EAE5D2A990778009F1BE8 /* ExchangeListView.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 4EB095292989CBFE0043A8A1 /* 
ExchangeListView.swift */; };
-               4E3EAE5E2A990778009F1BE8 /* WithdrawProgressView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4EB0953F2989CBFE0043A8A1 /* 
WithdrawProgressView.swift */; };
                4E3EAE5F2A990778009F1BE8 /* QRSheet.swift in Sources */ = {isa 
= PBXBuildFile; fileRef = 4EEC157929F9427F00D46A03 /* QRSheet.swift */; };
                4E3EAE602A990778009F1BE8 /* P2pReceiveURIView.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 4E3B4BC02A41E6C200CC88B8 /* 
P2pReceiveURIView.swift */; };
                4E3EAE612A990778009F1BE8 /* ListStyle.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4E6EDD862A363D8D0031D520 /* ListStyle.swift */; 
};
@@ -208,7 +207,6 @@
                4EB095602989CBFE0043A8A1 /* BalancesSectionView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4EB0953A2989CBFE0043A8A1 /* 
BalancesSectionView.swift */; };
                4EB095612989CBFE0043A8A1 /* WithdrawURIView.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4EB0953C2989CBFE0043A8A1 /* 
WithdrawURIView.swift */; };
                4EB095622989CBFE0043A8A1 /* Model+Withdraw.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4EB0953D2989CBFE0043A8A1 /* 
Model+Withdraw.swift */; };
-               4EB095642989CBFE0043A8A1 /* WithdrawProgressView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4EB0953F2989CBFE0043A8A1 /* 
WithdrawProgressView.swift */; };
                4EB095652989CBFE0043A8A1 /* WithdrawTOSView.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4EB095402989CBFE0043A8A1 /* 
WithdrawTOSView.swift */; };
                4EB095662989CBFE0043A8A1 /* SideBarView.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4EB095422989CBFE0043A8A1 /* SideBarView.swift 
*/; };
                4EB095672989CBFE0043A8A1 /* LaunchAnimationView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4EB095432989CBFE0043A8A1 /* 
LaunchAnimationView.swift */; };
@@ -385,7 +383,6 @@
                4EB0953A2989CBFE0043A8A1 /* BalancesSectionView.swift */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; 
path = BalancesSectionView.swift; sourceTree = "<group>"; };
                4EB0953C2989CBFE0043A8A1 /* WithdrawURIView.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= WithdrawURIView.swift; sourceTree = "<group>"; };
                4EB0953D2989CBFE0043A8A1 /* Model+Withdraw.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= "Model+Withdraw.swift"; sourceTree = "<group>"; };
-               4EB0953F2989CBFE0043A8A1 /* WithdrawProgressView.swift */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.swift; path = WithdrawProgressView.swift; sourceTree = "<group>"; };
                4EB095402989CBFE0043A8A1 /* WithdrawTOSView.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= WithdrawTOSView.swift; sourceTree = "<group>"; };
                4EB095422989CBFE0043A8A1 /* SideBarView.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= SideBarView.swift; sourceTree = "<group>"; };
                4EB095432989CBFE0043A8A1 /* LaunchAnimationView.swift */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; 
path = LaunchAnimationView.swift; sourceTree = "<group>"; };
@@ -712,7 +709,6 @@
                        children = (
                                4EB0953C2989CBFE0043A8A1 /* 
WithdrawURIView.swift */,
                                4E5A88F62A3B9E5B00072618 /* 
WithdrawAcceptDone.swift */,
-                               4EB0953F2989CBFE0043A8A1 /* 
WithdrawProgressView.swift */,
                                4EB095402989CBFE0043A8A1 /* 
WithdrawTOSView.swift */,
                        );
                        path = WithdrawBankIntegrated;
@@ -1110,7 +1106,6 @@
                                4E3EAE5B2A990778009F1BE8 /* 
View+Notification.swift in Sources */,
                                4E3EAE5C2A990778009F1BE8 /* Model+Pending.swift 
in Sources */,
                                4E3EAE5D2A990778009F1BE8 /* 
ExchangeListView.swift in Sources */,
-                               4E3EAE5E2A990778009F1BE8 /* 
WithdrawProgressView.swift in Sources */,
                                E37AA62E2AF19BE0003850CF /* RefundURIView.swift 
in Sources */,
                                4E3EAE5F2A990778009F1BE8 /* QRSheet.swift in 
Sources */,
                                4E3EAE602A990778009F1BE8 /* 
P2pReceiveURIView.swift in Sources */,
@@ -1218,7 +1213,6 @@
                                4E3B4BC72A429F2A00CC88B8 /* 
View+Notification.swift in Sources */,
                                4EB0956E2989CBFE0043A8A1 /* Model+Pending.swift 
in Sources */,
                                4EB095522989CBFE0043A8A1 /* 
ExchangeListView.swift in Sources */,
-                               4EB095642989CBFE0043A8A1 /* 
WithdrawProgressView.swift in Sources */,
                                E37AA62F2AF19BE0003850CF /* RefundURIView.swift 
in Sources */,
                                4EEC157A29F9427F00D46A03 /* QRSheet.swift in 
Sources */,
                                4E3B4BC12A41E6C200CC88B8 /* 
P2pReceiveURIView.swift in Sources */,
diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift 
b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
index 9cf3534..dafe44e 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -90,8 +90,7 @@ struct ManualWithdraw: View {
                 symLog.log("❗️ \(navTitle) onDisappear")
             }
         } else {
-            WithdrawProgressView(message: exchangeBaseUrl.trimURL())
-                .navigationTitle("Contacting Exchange")
+            LoadingView(url: nil, message: exchangeBaseUrl.trimURL())
         }
       } .task(id: amountToTransfer.value) { // re-run this whenever 
amountToTransfer changes
           symLog.log("getExchangeByUrl(\(exchangeBaseUrl))")
diff --git a/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift 
b/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift
index 039f6e4..abaebff 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdrawDone.swift
@@ -45,8 +45,7 @@ struct ManualWithdrawDone: View {
                 .interactiveDismissDisabled()           // can only use "Done" 
button to dismiss
 //                .navigationTitle(navTitle)
             } else {
-                WithdrawProgressView(message: 
exchange.exchangeBaseUrl.trimURL())
-                    .navigationTitle("Loading " + navTitle)
+                LoadingView(url: nil, message: 
exchange.exchangeBaseUrl.trimURL())
             }
         }.onAppear() {
             symLog.log("onAppear")
diff --git a/TalerWallet1/Views/HelperViews/LoadingView.swift 
b/TalerWallet1/Views/HelperViews/LoadingView.swift
index 10450fc..b156cc0 100644
--- a/TalerWallet1/Views/HelperViews/LoadingView.swift
+++ b/TalerWallet1/Views/HelperViews/LoadingView.swift
@@ -7,22 +7,49 @@ import SymLog
 
 struct LoadingView: View {
     private let symLog = SymLogV(0)
-    let navTitle = String(localized: "Loading...")
-    let backButtonHidden: Bool
+    let url:URL?
+    let message: String?
+
+//    let backButtonHidden: Bool
+    let navTitle = String(localized: "Loading…")
+
+    @State private var rotationEnabled = true
 
     var body: some View {
-        LaunchAnimationView()
-            .navigationBarBackButtonHidden(backButtonHidden)
-            .navigationTitle(navTitle)
-            .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: 
.center)
-//            
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
+        VStack(alignment: .center) {
+            Spacer()
+            RotatingTaler(size: 100, rotationEnabled: $rotationEnabled)
+                .onTapGesture(count: 2) {
+                    rotationEnabled.toggle()
+                }
+            Spacer()
+            if let url {
+                if let urlStr = url.host {
+                    Text(urlStr)
+                } else {
+                    Text("Error in URL: \(url)")
+                }
+                Spacer()
+            }
+            if let message {
+                Text(message)
+            } else {
+                Text(EMPTYSTRING)
+            }
+            Spacer()
+            Spacer()
+        }
+        .frame(maxWidth: .infinity)
+        .accessibilityFont(.title)
+        .navigationTitle("Loading…")
+        .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
     }
 }
 // MARK: -
 struct LoadingView_Previews: PreviewProvider {
     static var previews: some View {
         NavigationView {
-            LoadingView(backButtonHidden: true)
+            LoadingView(url: nil, message: "test message")  // , 
backButtonHidden: true)
                 .navigationBarTitleDisplayMode(.automatic)
         }.navigationViewStyle(.stack)
     }
diff --git a/TalerWallet1/Views/Peer2peer/P2PReadyV.swift 
b/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
index b448eaa..1600ddf 100644
--- a/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
+++ b/TalerWallet1/Views/Peer2peer/P2PReadyV.swift
@@ -51,7 +51,7 @@ struct P2PReadyV: View {
                 .navigationBarBackButtonHidden(true)
                 .interactiveDismissDisabled()           // can only use "Done" 
button to dismiss
             } else {
-                WithdrawProgressView(message: "Loading...")
+                LoadingView(url: nil, message: "for 
\(amountToTransfer.currencyStr)")
             }
         }
         .navigationTitle(navTitle)
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift 
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
index 7d4b384..8a8fbcf 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift
@@ -51,25 +51,21 @@ struct P2pPayURIView: View {
                     .buttonStyle(TalerButtonStyle(type: .prominent))
                     .padding(.horizontal)
             } else {
-                WithdrawProgressView(message: url.host ?? "Yikes❗️ no valid 
URL")
-                    .navigationTitle("Contacting Exchange")
+                LoadingView(url: url, message: nil)
+                    .task { do {
+                        symLog.log(".task")
+                        let ppDebitResponse = try await 
model.preparePeerPullDebitM(url.absoluteString)
+                        peerPullDebitResponse = ppDebitResponse
+                    } catch {    // TODO: error
+                        symLog.log(error.localizedDescription)
+                        peerPullDebitResponse = nil
+                    } }
             }
         }
         .onAppear() {
             symLog.log("onAppear")
             DebugViewC.shared.setSheetID(SHEET_PAY_P2P)
         }
-        .task {
-            do { // TODO: cancelled
-                symLog.log(".task")
-                let ppDebitResponse = try await 
model.preparePeerPullDebitM(url.absoluteString)
-                peerPullDebitResponse = ppDebitResponse
-            } catch {    // TODO: error
-                symLog.log(error.localizedDescription)
-                peerPullDebitResponse = nil
-            }
-        }
-
     }
 }
 // MARK: -
diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift 
b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
index 05da8fb..bb2a14e 100644
--- a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
+++ b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift
@@ -60,9 +60,7 @@ struct P2pReceiveURIView: View {
                                     p2p: true)
                 }
             } else {
-                // Yikes no details or no baseURL
-                WithdrawProgressView(message: url.host ?? badURL)
-                    .navigationTitle("Contacting Exchange")
+                LoadingView(url: url, message: nil)
             }
         }
         .onAppear() {
diff --git a/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift 
b/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift
index 0a7028e..4951b0f 100644
--- a/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift
+++ b/TalerWallet1/Views/Sheets/Payment/PayTemplateView.swift
@@ -103,9 +103,7 @@ struct PayTemplateView: View {
                 DebugViewC.shared.setSheetID(SHEET_PAY_TEMPLATE)
             }
         } else {
-            let badURL = "Error in Link: \(url)"
-            WithdrawProgressView(message: url.host ?? badURL)
-                .navigationTitle("Find Exchange")
+            LoadingView(url: url, message: nil)
                 .task {
                     do {
                         symLog.log(".task")
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift 
b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
index 4ce2970..4c89f13 100644
--- a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
+++ b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift
@@ -99,9 +99,7 @@ struct PaymentView: View {
                 DebugViewC.shared.setSheetID(SHEET_PAYMENT)
             }
         } else {
-            let badURL = "Error in Link: \(url)"
-            WithdrawProgressView(message: url.host ?? badURL)
-                .navigationTitle("Find Exchange")
+            LoadingView(url: url, message: nil)
                 .task {
                     do {
                         symLog.log(".task")
diff --git a/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift 
b/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
index edebcff..66d1870 100644
--- a/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
+++ b/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
@@ -34,9 +34,7 @@ struct RefundURIView: View {
                           suspendAction: model.suspendTransaction,
                            resumeAction: model.resumeTransaction)
         } else {
-            let badURL = "Error in Link: \(url)"
-            WithdrawProgressView(message: url.host ?? badURL)
-                .navigationTitle("Find Exchange")
+            LoadingView(url: url, message: nil)
                 .task {
                     do {
                         symLog.log(".task")
diff --git 
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift 
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
index 048351d..0a32a3c 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
@@ -44,8 +44,8 @@ struct WithdrawAcceptDone: View {
                 .interactiveDismissDisabled()           // can only use "Done" 
button to dismiss
                 .navigationTitle(navTitle)
             } else {
-                WithdrawProgressView(message: "Bank Confirmation")
-                    .navigationTitle("Loading...")
+                LoadingView(url: nil, message: exchangeBaseUrl?.trimURL()
+                                                    ?? "Bank Confirmation")
             }
         }.onAppear() {
             symLog.log("onAppear")
diff --git 
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawProgressView.swift 
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawProgressView.swift
deleted file mode 100644
index 0c7e906..0000000
--- 
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawProgressView.swift
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
- * See LICENSE.md
- */
-import SwiftUI
-
-struct WithdrawProgressView: View {
-    let message: String
-
-    var body: some View {
-        VStack {
-            Spacer()
-            ProgressView()
-            Spacer()
-            HStack {
-                Spacer()
-                Text(message)
-                    .accessibilityFont(.title)
-                Spacer()
-            }
-            Spacer()
-            Spacer()
-        }
-        .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
-    }
-}
-
-struct WithdrawProgressView_Previews: PreviewProvider {
-    static var previews: some View {
-        WithdrawProgressView(message: "message")
-    }
-}
diff --git 
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawTOSView.swift 
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawTOSView.swift
index 0eba89c..9171ac7 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawTOSView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawTOSView.swift
@@ -22,11 +22,11 @@ struct WithdrawTOSView: View {
     @State var exchangeTOS: ExchangeTermsOfService?
 
     var body: some View {
-        VStack {
+        if let exchangeTOS {
             Content(symLog: symLog, exchangeTOS: exchangeTOS, myListStyle: 
$myListStyle) {
                 Task { // runs on MainActor
                     do {
-                        if let exchangeBaseUrl, let exchangeTOS {
+                        if let exchangeBaseUrl {
                             _ = try await 
model.setExchangeTOSAcceptedM(exchangeBaseUrl, etag: exchangeTOS.currentEtag)
                             if acceptAction != nil {
                                 acceptAction!()
@@ -42,35 +42,32 @@ struct WithdrawTOSView: View {
                 }
             }
             .navigationTitle(navTitle)
-            .overlay {
-                if exchangeTOS == nil {
+            .onAppear() {
+                if viewID > SHEET_WITHDRAWAL {
+                    DebugViewC.shared.setSheetID(SHEET_WITHDRAW_TOS)
+                } else {
+                    DebugViewC.shared.setViewID(VIEW_WITHDRAW_TOS, stack: 
stack.push())
+                }
+            }
+        } else {
+            LoadingView(url: nil, message: exchangeBaseUrl?.trimURL() ?? "No 
exchangeBaseUrl!")
+//            ContactingExchangeV(url: nil, message: exchangeBaseUrl?.trimURL()
+//                                                ?? "No exchangeBaseUrl!")
+                .task { do {
                     if let exchangeBaseUrl {
-                        WithdrawProgressView(message: 
exchangeBaseUrl.trimURL())
-                            .navigationTitle("Loading " + navTitle)
+                        let acceptedFormat: [String] = [MARKDOWN, PLAINTEXT]
+                        let someTOS = try await 
model.loadExchangeTermsOfServiceM(exchangeBaseUrl,
+                                                                   
acceptedFormat: acceptedFormat)
+                        exchangeTOS = someTOS
                     } else {
-                        // Yikes!
-                        WithdrawProgressView(message: "No exchangeBaseUrl!")
-                            .navigationTitle("Loading " + navTitle)
+                        // TODO: Yikes! No baseURL
+
+
+
                     }
-                }
-            }
-        }.onAppear() {
-            if viewID > SHEET_WITHDRAWAL {
-                DebugViewC.shared.setSheetID(SHEET_WITHDRAW_TOS)
-            } else {
-                DebugViewC.shared.setViewID(VIEW_WITHDRAW_TOS, stack: 
stack.push())
-            }
-        }.task {
-            do {
-                if let exchangeBaseUrl {
-                    let acceptedFormat: [String] = [MARKDOWN, PLAINTEXT]
-                    let someTOS = try await 
model.loadExchangeTermsOfServiceM(exchangeBaseUrl,
-                                                                
acceptedFormat: acceptedFormat)
-                    exchangeTOS = someTOS
-                }
-            } catch {    // TODO: error
-                symLog.log(error.localizedDescription)
-            }
+                } catch {    // TODO: error
+                    symLog.log(error.localizedDescription)
+                } }
         }
     }
 }
diff --git 
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift 
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
index 9ae8592..a5af316 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -25,7 +25,6 @@ struct WithdrawURIView: View {
     @State private var exchange: Exchange? = nil
 
     var body: some View {
-        let badURL = "Error in URL: \(url)"
         VStack {
             if let withdrawalAmountDetails, let exchange {
                 List {
@@ -70,10 +69,8 @@ struct WithdrawURIView: View {
                                  viewID: SHEET_WITHDRAW_TOS,
                                     p2p: false)
                 }
-            } else {
-                // Yikes no details or no exchange
-                WithdrawProgressView(message: url.host ?? badURL)
-                    .navigationTitle("Contacting Exchange")
+            } else {        // no details or no exchange
+                LoadingView(url: url, message: nil)
             }
         }
         .onAppear() {
diff --git a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift 
b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
index 463ab76..0979370 100644
--- a/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawExchangeV.swift
@@ -28,8 +28,7 @@ struct WithdrawExchangeV: View {
                      exchangeBaseUrl: exchangeBaseUrl,
                     amountToTransfer: $amountToTransfer)
             } else {
-                WithdrawProgressView(message: exchangeBaseUrl?.trimURL() ?? 
"No exchangeBaseUrl!")
-//                ContactingExchangeV(url: url, message: nil)
+                LoadingView(url: url, message: "No exchangeBaseUrl!")
             }
         }
         .task {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]