From 0f672f414b3ea417c8672a94ad33160ddec14ef4 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 15 Sep 2020 20:49:36 +0200 Subject: [PATCH] Fixed that when entering TAN is required chunkedResponseHandler got called for same handledResponse multiple time, therefore adding e.g. same transactions multiple times to bookedTransactions --- .../kotlin/net/dankito/banking/fints/FinTsClient.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 c4ea7a9c..fb0b5ce4 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -675,7 +675,11 @@ open class FinTsClient( } } ?: run { - dialogContext.chunkedResponseHandler?.invoke(handledResponse) + // e.g. response = enter TAN response, but handledResponse is then response after entering TAN, e.g. account transactions + // -> chunkedResponseHandler would get called for same handledResponse multiple times + if (response == handledResponse) { + dialogContext.chunkedResponseHandler?.invoke(handledResponse) + } callback(handledResponse) }