taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 1ff8705310c59de3d361177b6a688a6906c910b7
parent 416553aa0079b6d40bc2b67bb41e6dc410218f70
Author: Marc Stibane <marc@taler.net>
Date:   Wed, 28 Aug 2024 09:48:22 +0200

KYC

Diffstat:
MTalerWallet1/Localizable.xcstrings | 18+++++++++---------
MTalerWallet1/Model/Transaction.swift | 9++++++---
MTalerWallet1/Views/Main/MainView.swift | 2+-
MTalerWallet1/Views/Settings/SettingsView.swift | 2+-
4 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/TalerWallet1/Localizable.xcstrings b/TalerWallet1/Localizable.xcstrings @@ -7792,23 +7792,23 @@ } } }, - "Will go to KYC website to confirm this withdrawal." : { + "Will go to KYC website to permit this withdrawal." : { "localizations" : { "de" : { "stringUnit" : { "state" : "translated", - "value" : "Geht zur KYC-Webseite um diese Abhebung zu bestätigen." + "value" : "Geht zur KYC-Webseite um diese Abhebung zu erlauben." } }, "es" : { "stringUnit" : { - "state" : "translated", - "value" : "Irá al sitio web KYC para confirmar esta extracción" + "state" : "needs_review", + "value" : "Irá al sitio web KYC para confirmar esta extracción." } }, "uk" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "Перейде на вебсайт KYC для підтвердження цього зняття." } } @@ -8243,24 +8243,24 @@ } } }, - "You need to pass a KYC procedure" : { + "You need to pass a KYC procedure." : { "localizations" : { "de" : { "stringUnit" : { "state" : "translated", - "value" : "Sie müssen ein KYC-Verfahren durchlaufen" + "value" : "Sie müssen ein KYC-Verfahren durchlaufen." } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Necesita pasar un un procedimiento de KYC" + "value" : "Necesita pasar un un procedimiento de KYC." } }, "uk" : { "stringUnit" : { "state" : "translated", - "value" : "Ви повинні пройти процедуру KYC" + "value" : "Ви повинні пройти процедуру KYC." } } } diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift @@ -24,7 +24,9 @@ enum TransactionMinorState: String, Codable { case deposit case aml // AmlRequired case kyc // KycRequired - case mergeKycRequired = "merge-kyc" // same as KYC but for P2P + case balanceKyc = "balance-kyc" // show kycUrl + case balanceKycInit = "balance-kyc-init" // kycUrl not yet ready + case mergeKycRequired = "merge-kyc" // same as KYC but for P2P case track case submitPayment = "submit-payment" case rebindSession = "rebind-session" @@ -59,8 +61,9 @@ enum TransactionMinorState: String, Codable { switch self { case .unknown: return self.rawValue case .deposit: return self.rawValue - case .kyc, .mergeKycRequired: return String(localized: "MinorState.kyc", defaultValue: "KYC required", comment: "TxMinorState heading") case .aml: return String(localized: "MinorState.aml", defaultValue: "AML required", comment: "TxMinorState heading") + case .balanceKyc, .balanceKycInit, + .kyc, .mergeKycRequired: return String(localized: "MinorState.kyc", defaultValue: "KYC required", comment: "TxMinorState heading") case .track: return self.rawValue case .submitPayment: return self.rawValue case .rebindSession: return self.rawValue @@ -258,7 +261,7 @@ struct TransactionCommon: Decodable, Sendable { var isPending : Bool { txState.major == .pending } var isPendingReady : Bool { isPending && txState.minor == .ready } - var isPendingKYC : Bool { isPending && txState.minor == .kyc } + var isPendingKYC : Bool { isPending && (txState.minor == .kyc || txState.minor == .balanceKyc || txState.minor == .mergeKycRequired) } var isDone : Bool { txState.major == .done } var isAborting : Bool { txState.major == .aborting } var isAborted : Bool { txState.major == .aborted } diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -317,7 +317,7 @@ extension MainView { } } } - .alert("You need to pass a KYC procedure", + .alert("You need to pass a KYC procedure.", isPresented: $showKycAlert, actions: { openKycButton dismissAlertButton }, diff --git a/TalerWallet1/Views/Settings/SettingsView.swift b/TalerWallet1/Views/Settings/SettingsView.swift @@ -155,7 +155,7 @@ struct SettingsView: View { #if DEBUG if showDevelopItems { let banks = ["taler.fdold.eu", "regio-taler.fdold.eu", "taler.grothoff.org", "taler.ar", - "head.taler.net", "test.taler.net", "demo.taler.net"] + "head.taler.net", "test.taler.net", "demo.taler.net", "kyctest.taler.net"] ForEach(banks, id: \.self) { bank in let urlStr = "https://bank." + bank Link(bank, destination: URL(string: urlStr)!)