[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 58/69: use scopeInfo
From: |
gnunet |
Subject: |
[taler-taler-ios] 58/69: use scopeInfo |
Date: |
Fri, 19 Jan 2024 09:02:31 +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 fa377b5ca34c21f287994999f5db5b7e7f861ca4
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Jan 18 00:59:05 2024 +0100
use scopeInfo
---
TalerWallet1/Views/Banking/ExchangeListView.swift | 3 ++-
TalerWallet1/Views/Banking/ExchangeRowView.swift | 8 +++++---
TalerWallet1/Views/Banking/ExchangeSectionView.swift | 5 +++--
TalerWallet1/Views/Banking/ManualWithdrawDone.swift | 3 ++-
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/TalerWallet1/Views/Banking/ExchangeListView.swift
b/TalerWallet1/Views/Banking/ExchangeListView.swift
index aa5c261..718291f 100644
--- a/TalerWallet1/Views/Banking/ExchangeListView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeListView.swift
@@ -120,7 +120,8 @@ extension ExchangeListCommonV {
var currencies: [String : [Exchange]] = [:]
for exchange in exchanges {
- let currency = exchange.currency ?? "Unknown"
+ let currency = exchange.scopeInfo?.currency
+ ?? exchange.currency ?? "Unknown"
if currencies[currency] != nil {
currencies[currency]!.append(exchange)
} else {
diff --git a/TalerWallet1/Views/Banking/ExchangeRowView.swift
b/TalerWallet1/Views/Banking/ExchangeRowView.swift
index 59c76de..a16e6ad 100644
--- a/TalerWallet1/Views/Banking/ExchangeRowView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeRowView.swift
@@ -105,7 +105,8 @@ struct ExchangeRowView: View {
if controller.hasInfo(for: currency) == nil {
symLog.log("fetching info for \(currency)")
// FIXME: remove fake ScopeInfo once the REAL one is in
exchange.scopeInfo
- let scopeInfo = exchange.scopeInfo ?? ScopeInfo(type: .global,
currency: currency)
+ let scopeInfo = exchange.scopeInfo
+ ?? ScopeInfo(type: .global, currency: currency)
do {
let info = try await model.getCurrencyInfoM(scope:
scopeInfo, delay: delay)
// logger.info("got info: \(scope.currency, privacy:
.public)")
@@ -124,15 +125,16 @@ fileprivate struct ExchangeRow_Container : View {
// let amount = Amount(currency: LONGCURRENCY, cent: 123456)
var body: some View {
+ let scopeInfo = ScopeInfo(type: .exchange, currency: LONGCURRENCY)
let exchange1 = Exchange(exchangeBaseUrl: ARS_AGE_EXCHANGE,
- currency: LONGCURRENCY,
+ scopeInfo: scopeInfo,
paytoUris: [],
tosStatus: .pending,
exchangeEntryStatus: .preset,
exchangeUpdateStatus: .initial,
ageRestrictionOptions: [12,16])
let exchange2 = Exchange(exchangeBaseUrl: ARS_EXP_EXCHANGE,
- currency: LONGCURRENCY,
+ scopeInfo: scopeInfo,
paytoUris: [],
tosStatus: .proposed,
exchangeEntryStatus: .ephemeral,
diff --git a/TalerWallet1/Views/Banking/ExchangeSectionView.swift
b/TalerWallet1/Views/Banking/ExchangeSectionView.swift
index 80a8e9a..09bfa7e 100644
--- a/TalerWallet1/Views/Banking/ExchangeSectionView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeSectionView.swift
@@ -55,15 +55,16 @@ fileprivate struct ExchangeRow_Container : View {
// let amount = Amount(currency: LONGCURRENCY, cent: 123456)
var body: some View {
+ let scopeInfo = ScopeInfo(type: .exchange, currency: LONGCURRENCY)
let exchange1 = Exchange(exchangeBaseUrl: ARS_AGE_EXCHANGE,
- currency: LONGCURRENCY,
+ scopeInfo: scopeInfo,
paytoUris: [],
tosStatus: .pending,
exchangeEntryStatus: .preset,
exchangeUpdateStatus: .initial,
ageRestrictionOptions: [12,16])
let exchange2 = Exchange(exchangeBaseUrl: ARS_EXP_EXCHANGE,
- currency: LONGCURRENCY,
+ scopeInfo: scopeInfo,
paytoUris: [],
tosStatus: .proposed,
exchangeEntryStatus: .ephemeral,
diff --git a/TalerWallet1/Views/Banking/ManualWithdrawDone.swift
b/TalerWallet1/Views/Banking/ManualWithdrawDone.swift
index d9ecd26..d4fa7ec 100644
--- a/TalerWallet1/Views/Banking/ManualWithdrawDone.swift
+++ b/TalerWallet1/Views/Banking/ManualWithdrawDone.swift
@@ -73,8 +73,9 @@ struct ManualWithdrawDone_Container : View {
@State private var amountToTransfer = Amount(currency: LONGCURRENCY, cent:
510)
var body: some View {
+ let scopeInfo = ScopeInfo(type: .exchange, currency: LONGCURRENCY)
let exchange = Exchange(exchangeBaseUrl: DEMOEXCHANGE,
- currency: LONGCURRENCY,
+ scopeInfo: scopeInfo,
paytoUris: [],
tosStatus: .pending,
exchangeEntryStatus: .preset,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 26/69: Layout transactions, (continued)
- [taler-taler-ios] 26/69: Layout transactions, gnunet, 2024/01/19
- [taler-taler-ios] 51/69: cleanup, gnunet, 2024/01/19
- [taler-taler-ios] 67/69: Bump version to 0.9.4 (0), gnunet, 2024/01/19
- [taler-taler-ios] 68/69: lowercased(), gnunet, 2024/01/19
- [taler-taler-ios] 54/69: Keyboard needs more time, gnunet, 2024/01/19
- [taler-taler-ios] 49/69: accessibilityDate, gnunet, 2024/01/19
- [taler-taler-ios] 46/69: AccountRestriction, gnunet, 2024/01/19
- [taler-taler-ios] 59/69: bugfix, gnunet, 2024/01/19
- [taler-taler-ios] 43/69: currency == ISO 4217, gnunet, 2024/01/19
- [taler-taler-ios] 56/69: remove "code", since "currency" IS ISO-4217 already for global, gnunet, 2024/01/19
- [taler-taler-ios] 58/69: use scopeInfo,
gnunet <=
- [taler-taler-ios] 52/69: return to Balances after tx, gnunet, 2024/01/19
- [taler-taler-ios] 33/69: bars relative to fontSize, gnunet, 2024/01/19
- [taler-taler-ios] 63/69: Locale.preferredLanguageCode, gnunet, 2024/01/19
- [taler-taler-ios] 40/69: Exchange -> Banking, gnunet, 2024/01/19
- [taler-taler-ios] 65/69: Restrictions, gnunet, 2024/01/19
- [taler-taler-ios] 62/69: cleanup, preview, gnunet, 2024/01/19
- [taler-taler-ios] 36/69: b-i-withdrawal hint, gnunet, 2024/01/19
- [taler-taler-ios] 45/69: remove SideBarView, gnunet, 2024/01/19
- [taler-taler-ios] 69/69: Bump version to 0.9.4 (1), gnunet, 2024/01/19
- [taler-taler-ios] 61/69: InfiniteTransactionLoop, gnunet, 2024/01/19