summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Stibane <marc@taler.net>2023-10-20 08:50:06 +0200
committerMarc Stibane <marc@taler.net>2023-10-20 09:33:16 +0200
commit1dfae8887cad2631fa2b13af8c8fea31867da1c3 (patch)
treecc060e6579fb7073be54dcd55f62f7248ec67c51
parent3e2da084e65b6ee5b121d0915609418d91f8f4cc (diff)
downloadtaler-ios-1dfae8887cad2631fa2b13af8c8fea31867da1c3.tar.gz
taler-ios-1dfae8887cad2631fa2b13af8c8fea31867da1c3.tar.bz2
taler-ios-1dfae8887cad2631fa2b13af8c8fea31867da1c3.zip
getCurrencyInfo(scope)
-rw-r--r--TalerWallet1/Model/Model+Exchange.swift8
1 files changed, 5 insertions, 3 deletions
diff --git a/TalerWallet1/Model/Model+Exchange.swift b/TalerWallet1/Model/Model+Exchange.swift
index 6735dc0..0622245 100644
--- a/TalerWallet1/Model/Model+Exchange.swift
+++ b/TalerWallet1/Model/Model+Exchange.swift
@@ -156,11 +156,13 @@ extension WalletModel {
_ = try await sendRequest(request)
}
- @MainActor func getCurrencySpecificationM(scope: ScopeInfo)
- async throws -> CurrencySpecification { // M for MainActor
+ func getCurrencyInfo(scope: ScopeInfo)
+ async throws -> CurrencyInfo {
let request = GetCurrencySpecification(scope: scope)
let response = try await sendRequest(request, ASYNCDELAY)
- return response
+ return CurrencyInfo(scope: scope, specs: response.currencySpecification,
+ formatter: CurrencyFormatter.formatter(scope: scope,
+ specs: response.currencySpecification))
}
}