From dae6084ebbc8280d881f21040b8122667591c0d6 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 26 Aug 2024 22:25:09 +0200 Subject: [PATCH] Selecting active TAN media first --- .../kotlin/net/codinux/banking/fints/FinTsJobExecutor.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsJobExecutor.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsJobExecutor.kt index f8315cf0..105bc38b 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsJobExecutor.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsJobExecutor.kt @@ -307,6 +307,7 @@ open class FinTsJobExecutor( bank.selectedTanMedium = preferredTanMedium?.let { bank.tanMedia.firstOrNull { it.mediumName == preferredTanMedium } } ?: bank.selectedTanMedium?.let { selected -> bank.tanMedia.firstOrNull { it.mediumName == selected.mediumName } } // try to find selectedTanMedium in new TanMedia instances + ?: bank.tanMedia.firstOrNull { it.status == TanMediumStatus.Aktiv && it.mediumName != null } ?: bank.tanMedia.firstOrNull { it.mediumName != null } }