commit 1a3d88d494770c9f3ea63ad5b8ce8e6a120ed36f
parent 1f3d848d662ae007747b70cea4f550e697297a3c
Author: Marc Stibane <marc@taler.net>
Date: Fri, 22 Sep 2023 16:23:07 +0200
!!! Temporarily add back old cases to ExchangeTosStatus to be able to run with older wallet-core version !!!
Fixed missing cases - now Exchanges can be shown again
Diffstat:
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/TalerWallet1/Model/Model+Exchange.swift b/TalerWallet1/Model/Model+Exchange.swift
@@ -26,18 +26,20 @@ enum ExchangeUpdateStatus: String, Codable {
/// The result from wallet-core's ListExchanges
struct Exchange: Codable, Hashable, Identifiable {
static func == (lhs: Exchange, rhs: Exchange) -> Bool {
- return lhs.exchangeBaseUrl == rhs.exchangeBaseUrl &&
- lhs.tosStatus == rhs.tosStatus &&
- lhs.exchangeEntryStatus == rhs.exchangeEntryStatus &&
- lhs.exchangeUpdateStatus == rhs.exchangeUpdateStatus
+ return lhs.exchangeBaseUrl == rhs.exchangeBaseUrl
+ && lhs.tosStatus == rhs.tosStatus
+ && lhs.exchangeStatus == rhs.exchangeStatus // deprecated
+ && lhs.exchangeEntryStatus == rhs.exchangeEntryStatus
+ && lhs.exchangeUpdateStatus == rhs.exchangeUpdateStatus
}
var exchangeBaseUrl: String
var currency: String?
var paytoUris: [String]
var tosStatus: ExchangeTosStatus
- var exchangeEntryStatus: ExchangeEntryStatus
- var exchangeUpdateStatus: ExchangeUpdateStatus
+ var exchangeStatus: String? // deprecated
+ var exchangeEntryStatus: ExchangeEntryStatus? // new, but not yet deployed in demo.taler.net
+ var exchangeUpdateStatus: ExchangeUpdateStatus? // new, but not yet deployed in demo.taler.net
var ageRestrictionOptions: [Int]
var lastUpdateErrorInfo: ExchangeError?
diff --git a/TalerWallet1/Model/Model+Withdraw.swift b/TalerWallet1/Model/Model+Withdraw.swift
@@ -67,14 +67,14 @@ fileprivate struct GetWithdrawalDetailsForAmount: WalletBackendFormattedRequest
}
// MARK: -
enum ExchangeTosStatus: String, Codable {
- case new = "new"
- case accepted = "accepted"
- case changed = "changed"
- case notFound = "not-found"
- case unknown = "unknown"
- case pending
- case proposed
-// case accepted
+ case new = "new" // deprecated
+// case accepted = "accepted" // old == new
+ case changed = "changed" // deprecated
+ case notFound = "not-found" // deprecated
+ case unknown = "unknown" // deprecated
+ case pending // new, but not yet deployed in demo.taler.net
+ case proposed // new, but not yet deployed in demo.taler.net
+ case accepted // new == old
}
struct ExchangeTermsOfService: Decodable {
var currentEtag: String