Extracted TanMethodsPreferredByMostApplications

This commit is contained in:
dankito 2024-10-16 15:33:26 +02:00
parent 12304684fc
commit 803e44118c
4 changed files with 8 additions and 4 deletions

View File

@ -34,7 +34,7 @@ open class GetAccountDataOptions(
* But also graphical applications prefer non visual TanMethods as then they only have to display a text field to input
* TAN, and then image based TanMethods as then they additionally only have to display an image.
*/
val preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
val preferredTanMethods: List<TanMethodType>? = TanMethodType.TanMethodsPreferredByMostApplications,
val tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,

View File

@ -71,7 +71,7 @@ open class TransferMoneyRequest(
* But also graphical applications prefer non visual TanMethods as then they only have to display a text field to input
* TAN, and then image based TanMethods as then they additionally only have to display an image.
*/
val preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
val preferredTanMethods: List<TanMethodType>? = TanMethodType.TanMethodsPreferredByMostApplications,
val tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,

View File

@ -35,7 +35,7 @@ open class TransferMoneyRequestForUser(
instantTransfer: Boolean = false,
preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
preferredTanMethods: List<TanMethodType>? = TanMethodType.TanMethodsPreferredByMostApplications,
tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,
clientData: Any? = null,
@ -52,7 +52,7 @@ open class TransferMoneyRequestForUser(
amount: Amount, currency: String = DefaultValues.DefaultCurrency, paymentReference: String? = null, instantTransfer: Boolean = false
) : this(bank.domesticBankCode, bank.loginName, bank.password!!, account?.let { BankAccountIdentifier(it.identifier, it.subAccountNumber, it.iban) },
recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer,
listOf(bank.selectedTanMethod.type) + TanMethodType.NonVisualOrImageBased, TanMethodType.TanMethodsNotSupportedByMostApplications, bank.clientData, bank.serializedClientData) {
listOf(bank.selectedTanMethod.type) + TanMethodType.TanMethodsPreferredByMostApplications, TanMethodType.TanMethodsNotSupportedByMostApplications, bank.clientData, bank.serializedClientData) {
this.bank = bank
this.account = account
}

View File

@ -57,6 +57,10 @@ enum class TanMethodType {
this.add(index, ChipTanFlickerCode)
}.toList()
val TanMethodsPreferredByMostApplications = NonVisualOrImageBased
val TanMethodsNotSupportedByMostApplications = listOf(TanMethodType.ChipTanUsb)
}