diff --git a/TalerWallet1/Views/Transactions/KYCauth.swift b/TalerWallet1/Views/Transactions/KYCauth.swift index c7624100..ee349db3 100755 --- a/TalerWallet1/Views/Transactions/KYCauth.swift +++ b/TalerWallet1/Views/Transactions/KYCauth.swift @@ -27,7 +27,14 @@ struct KYCauth: View { let kycErr = String(localized: "KYC Error") if let info = common.kycAuthTransferInfo { let debitPayTo = PayTo(info.debitPaytoUri) - if let debitIban = debitPayTo.iban { + // Not every account a deposit can go to is an IBAN: x-taler-bank and Cyclos + // accounts can be added in Bank Accounts too, and the payment service asks for + // the same proof of control for them. (PayTo.xTaler is not usable here: it is + // set to a placeholder text for every address that is not x-taler-bank.) + let debitAccount = debitPayTo.iban + ?? debitPayTo.cyclos + ?? URL(string: info.debitPaytoUri)?.xTaler + if let debitIban = debitAccount { let accountDetails = info.transferOptionsExt if let validDetails = accountDetails.validDetails { if let scope: ScopeInfo = common.scopes.first { @@ -44,7 +51,6 @@ struct KYCauth: View { } else { ErrorView(stack.push(), title: kycErr, message: String(localized: "No scope")) } } else { ErrorView(stack.push(), title: kycErr, message: String(localized: "No valid details")) } } else { - // TODO: What if payto contains no IBAN, but URL? ErrorView(stack.push(), title: kycErr, message: String(localized: "No IBAN")) } } else { ErrorView(stack.push(), title: kycErr, message: String(localized: "No KYC infos")) }