diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift index 51c680f2..639e6523 100755 --- a/TalerWallet1/Model/Transaction.swift +++ b/TalerWallet1/Model/Transaction.swift @@ -367,6 +367,7 @@ struct TransactionCommon: Decodable, Sendable { var error: TalerErrorDetail? var failReason: TalerErrorDetail? // only for isFailed TODO: i18n var kycUrl: String? + var kycAmlReview: Bool? // the payment service reviews the KYC data - the user can only wait var kycAuthTransferInfo: KycAuthTransferInfo? var isIncoming : Bool { type == .withdrawal diff --git a/TalerWallet1/Resources/Localizable.xcstrings b/TalerWallet1/Resources/Localizable.xcstrings index e283ca45..1783f874 100755 --- a/TalerWallet1/Resources/Localizable.xcstrings +++ b/TalerWallet1/Resources/Localizable.xcstrings @@ -19138,6 +19138,9 @@ } } }, + "The payment service is reviewing your information. Please wait." : { + "comment" : "KYC" + }, "The payment service is waiting for your wire-transfer." : { "localizations" : { "de" : { @@ -21666,6 +21669,9 @@ "comment" : "Alert message displayed when there is an error connecting to the NFC tag.", "isCommentAutoGenerated" : true }, + "Under review" : { + "comment" : "TxMinorState heading: the payment service reviews the KYC data" + }, "Unfortunately this means, that your %@ are not valid anymore, because they were obtained with the old security identity." : { "comment" : "A message that appears when the user has selected to keep their funds, but the funds are not valid anymore. The argument is the name of the currency.", "isCommentAutoGenerated" : true, diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryList.swift b/TalerWallet1/Views/Transactions/TransactionSummaryList.swift index 74f04b65..d342bcd6 100755 --- a/TalerWallet1/Views/Transactions/TransactionSummaryList.swift +++ b/TalerWallet1/Views/Transactions/TransactionSummaryList.swift @@ -210,7 +210,9 @@ struct TransactionSummaryList: View { .accessibilityLabel(a11yDate) .foregroundColor(WalletColors().secondary2(colorScheme, colorSchemeContrast)) .id(topID) - let state = localizedState(common.txState) + let underReview = common.isPending && common.kycAmlReview == true + let state = underReview ? String(localized: "Under review", comment: "TxMinorState heading: the payment service reviews the KYC data") + : localizedState(common.txState) let statusT = Text(state) .multilineTextAlignment(.trailing) let imageT = Text(common.type.icon()) @@ -463,12 +465,14 @@ struct TransactionSummaryList: View { // MARK: - struct KYCbutton: View { let kycUrl: String? + var underReview: Bool = false var body: some View { if let kycUrl { if let destination = URL(string: kycUrl) { LinkButton(destination: destination, - hintTitle: String(localized: "You need to pass a legitimization procedure.", comment: "KYC"), + hintTitle: underReview ? String(localized: "The payment service is reviewing your information. Please wait.", comment: "KYC") + : String(localized: "You need to pass a legitimization procedure.", comment: "KYC"), buttonTitle: String(localized: "Open legitimization website", comment: "KYC"), a11yHint: String(localized: "Will go to legitimization website to permit this withdrawal.", comment: "a11y"), badge: NEEDS_KYC) @@ -486,7 +490,7 @@ struct TransactionSummaryList: View { let common = transaction.common if transaction.isPendingKYC { if let kycUrl = common.kycUrl { - KYCbutton(kycUrl: common.kycUrl) + KYCbutton(kycUrl: common.kycUrl, underReview: common.kycAmlReview == true) } else { Text("Legitimization procedure required", comment: "KYC") } diff --git a/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift b/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift index 75efbdfb..6bfb9e25 100755 --- a/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift +++ b/TalerWallet1/Views/Transactions/TransactionTypeDetail.swift @@ -133,7 +133,7 @@ struct TransactionTypeDetail: View { if transaction.common.isPendingKYCauth { KYCauth(stack: stack.push(), common: common) } else if transaction.isPendingKYC { - KYCbutton(kycUrl: common.kycUrl) + KYCbutton(kycUrl: common.kycUrl, underReview: common.kycAmlReview == true) } ThreeAmountsSheet(stack: stack.push(), scope: scope, @@ -223,7 +223,7 @@ struct TransactionTypeDetail: View { case .peer2peer(let p2pTransaction): Group { let details = p2pTransaction.details if transaction.isPendingKYC { - KYCbutton(kycUrl: common.kycUrl) + KYCbutton(kycUrl: common.kycUrl, underReview: common.kycAmlReview == true) } if !transaction.isDone { ExpiresView(expiration: details.info.expiration)