Implemented resetting selected TAN procedures if user's TAN procedures doesn't contain selected one anymore (should almost never be the case)

This commit is contained in:
dankito 2020-09-01 14:05:54 +02:00
parent 73ba48b030
commit 61d9923230
1 changed files with 4 additions and 0 deletions

View File

@ -1100,6 +1100,10 @@ open class FinTsClient(
if (response.supportedTanProceduresForUser.isNotEmpty()) { if (response.supportedTanProceduresForUser.isNotEmpty()) {
customer.supportedTanProcedures = response.supportedTanProceduresForUser.mapNotNull { findTanProcedure(it, bank) } customer.supportedTanProcedures = response.supportedTanProceduresForUser.mapNotNull { findTanProcedure(it, bank) }
if (customer.supportedTanProcedures.firstOrNull { it.securityFunction == customer.selectedTanProcedure.securityFunction } == null) { // supportedTanProcedures don't contain selectedTanProcedure anymore
customer.resetSelectedTanProcedure()
}
} }
} }