[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.
- [taler-taler-ios] branch master updated (e082595 -> e79881c), gnunet, 2023/11/13
- [taler-taler-ios] 04/36: DD51 fractional base, gnunet, 2023/11/13
- [taler-taler-ios] 05/36: fix tests, gnunet, 2023/11/13
- [taler-taler-ios] 03/36: Exchange with scopeInfo, gnunet, 2023/11/13
- [taler-taler-ios] 02/36: Transaction, L10N, gnunet, 2023/11/13
- [taler-taler-ios] 19/36: amountToTransfer Pending, gnunet, 2023/11/13
- [taler-taler-ios] 23/36: amountToTransfer Exchange, gnunet, 2023/11/13
- [taler-taler-ios] 14/36: Debugging: Delay currency info,
gnunet <=
- [taler-taler-ios] 27/36: Debugging, gnunet, 2023/11/13
- [taler-taler-ios] 30/36: Bugfix, gnunet, 2023/11/13
- [taler-taler-ios] 12/36: DD51 Currency rendering, gnunet, 2023/11/13
- [taler-taler-ios] 24/36: Exchange needs Balance for Deposit, gnunet, 2023/11/13
- [taler-taler-ios] 21/36: amountToTransfer Send, gnunet, 2023/11/13
- [taler-taler-ios] 07/36: Amount(currency:cent:), gnunet, 2023/11/13
- [taler-taler-ios] 06/36: RequestPurpose, gnunet, 2023/11/13
- [taler-taler-ios] 01/36: Startup Chime, gnunet, 2023/11/13
- [taler-taler-ios] 18/36: amountToTransfer Transactions, gnunet, 2023/11/13
- [taler-taler-ios] 17/36: amountToTransfer Balances, gnunet, 2023/11/13