diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt index dd5ece13..2d713a6f 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -76,13 +76,7 @@ open class FinTsClient( /* Second dialog: some banks require that in order to initialize a dialog with strong customer authorization TAN media is required */ - if (jobExecutor.isJobSupported(bank, CustomerSegmentId.TanMediaList)) { - getTanMediaList(bank, TanMedienArtVersion.Alle, TanMediumKlasse.AlleMedien) { - addAccountGetAccountsAndTransactions(parameter, bank, callback) - } - } else { - addAccountGetAccountsAndTransactions(parameter, bank, callback) - } + addAccountGetAccountsAndTransactions(parameter, bank, callback) } } diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt index 0777a27d..b877953d 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt @@ -115,7 +115,15 @@ open class FinTsJobExecutor( callback(BankResponse(false, noTanMethodSelected = true)) } else { getUsersTanMethod(bank) { - callback(BankResponse(bank.isTanMethodSelected, noTanMethodSelected = !!!bank.isTanMethodSelected)) + if (bank.isTanMethodSelected == false) { + callback(BankResponse(false, noTanMethodSelected = true)) + } else if (bank.tanMedia.isEmpty() && isJobSupported(bank, CustomerSegmentId.TanMediaList)) { // tan media not retrieved yet + getTanMediaList(bank, TanMedienArtVersion.Alle, TanMediumKlasse.AlleMedien) { + callback(getTanMethodsResponse) // TODO: judge if bank requires selecting TAN media and if though evaluate getTanMediaListResponse + } + } else { + callback(getTanMethodsResponse) + } } } }