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)

This commit is contained in:
dankl 2020-01-19 16:54:32 +01:00 committed by dankito
parent a62e3e4c16
commit 8b7456bb29
1 changed files with 4 additions and 2 deletions

View File

@ -224,11 +224,13 @@ open class FinTsClient @JvmOverloads constructor(
balanceResponse.getFirstSegmentById<BalanceSegment>(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)