gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 14/36: Debugging: Delay currency info


From: gnunet
Subject: [taler-taler-ios] 14/36: Debugging: Delay currency info
Date: Mon, 13 Nov 2023 21:27:19 +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 73c64bd79d809a1c641bb9d3c3cb23001b1dd9e0
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Nov 12 13:23:27 2023 +0100

    Debugging: Delay currency info
---
 TalerWallet1/Model/Model+Exchange.swift | 4 ++--
 TalerWallet1/Views/Main/MainView.swift  | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Model/Model+Exchange.swift 
b/TalerWallet1/Model/Model+Exchange.swift
index 293bc3c..032ab24 100644
--- a/TalerWallet1/Model/Model+Exchange.swift
+++ b/TalerWallet1/Model/Model+Exchange.swift
@@ -191,10 +191,10 @@ extension WalletModel {
         _ = try await sendRequest(request)
     }
 
-    func getCurrencyInfo(scope: ScopeInfo)
+    func getCurrencyInfo(scope: ScopeInfo, delay: UInt = 0)
       async throws -> CurrencyInfo {
         let request = GetCurrencySpecification(scope: scope)
-        let response = try await sendRequest(request, ASYNCDELAY)
+        let response = try await sendRequest(request, ASYNCDELAY + delay)
         return CurrencyInfo(scope: scope, specs: 
response.currencySpecification,
                         formatter: CurrencyFormatter.formatter(scope: scope,
                                                                specs: 
response.currencySpecification))
diff --git a/TalerWallet1/Views/Main/MainView.swift 
b/TalerWallet1/Views/Main/MainView.swift
index 8aadbe2..fbfcc59 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -166,6 +166,9 @@ extension MainView {
 //            } else {
                 let _ = Self._printChanges()
 //            }
+            let delay: UInt = 5
+#else
+            let delay: UInt = 0
 #endif
           Group {
 #if TABBAR  // Taler Wallet
@@ -270,7 +273,7 @@ extension MainView {
                         Task { // runs on MainActor
                             logger.info("Task to get info for: 
\(scope.currency, privacy: .public)")
                             do {
-                                let info = try await 
model.getCurrencyInfo(scope: scope)
+                                let info = try await 
model.getCurrencyInfo(scope: scope, delay: delay)
                                 logger.info("got info: \(scope.currency, 
privacy: .public)")
                                 await controller.setInfo(info)
                             } catch {    // TODO: error handling - couldn't 
get CurrencyInfo

-- 
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]