From 8b7456bb29c55bde6a967305326b746a4ee12554 Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 19 Jan 2020 16:54:32 +0100 Subject: [PATCH] Fixed that DialogData's message number gets increased even though getBalance() message could not get created (e. g. if retrieving balance is not supported by account) --- .../src/main/kotlin/net/dankito/fints/FinTsClient.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt index 49ecf275..b8352c19 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -224,11 +224,13 @@ open class FinTsClient @JvmOverloads constructor( balanceResponse.getFirstSegmentById(InstituteSegmentId.Balance)?.let { balance = it.balance } + + if (balanceResponse.didReceiveResponse) { + dialogData.increaseMessageNumber() + } } - dialogData.increaseMessageNumber() - val message = messageBuilder.createGetTransactionsMessage(parameter, bank, customer, product, dialogData) val response = getAndHandleResponseForMessageThatMayRequiresTan(message, bank, customer, dialogData)