Fixed that if there are no accounts supporting retrieving account transactions addAccountAsync() never returns

This commit is contained in:
dankito 2020-08-06 02:48:50 +02:00
parent 374d196c71
commit d444baeda8
1 changed files with 5 additions and 0 deletions

View File

@ -247,6 +247,11 @@ open class FinTsClient(
val countAccountSupportingRetrievingTransactions = customer.accounts.filter { it.supportsFeature(AccountFeature.RetrieveAccountTransactions) }.size val countAccountSupportingRetrievingTransactions = customer.accounts.filter { it.supportsFeature(AccountFeature.RetrieveAccountTransactions) }.size
var countRetrievedAccounts = 0 var countRetrievedAccounts = 0
if (countAccountSupportingRetrievingTransactions == 0) {
addAccountAfterRetrievingTransactions(bank, customer, newUserInfoResponse, didOverwriteUserUnselectedTanProcedure,
originalAreWeThatGentleToCloseDialogs, transactionsOfLast90DaysResponses, balances, callback)
}
customer.accounts.forEach { account -> customer.accounts.forEach { account ->
if (account.supportsFeature(AccountFeature.RetrieveAccountTransactions)) { if (account.supportsFeature(AccountFeature.RetrieveAccountTransactions)) {
tryGetTransactionsOfLast90DaysWithoutTan(bank, customer, account, false) { response -> tryGetTransactionsOfLast90DaysWithoutTan(bank, customer, account, false) { response ->