Fixed that if TAN is required but we have been told to abort if requiring TAN, RetrievedAccountData is now set to successful
This commit is contained in:
parent
3e872514d6
commit
e30127415c
|
@ -132,6 +132,10 @@ open class FinTsClient(
|
||||||
tryGetTransactionsOfLast90DaysWithoutTan(bank, account) { response ->
|
tryGetTransactionsOfLast90DaysWithoutTan(bank, account) { response ->
|
||||||
retrievedAccountData.put(account, response.retrievedData.first())
|
retrievedAccountData.put(account, response.retrievedData.first())
|
||||||
|
|
||||||
|
if (response.errorMessage != null) {
|
||||||
|
//getAccountsResponse.errorMessage = response.errorMessage
|
||||||
|
}
|
||||||
|
|
||||||
countRetrievedAccounts++
|
countRetrievedAccounts++
|
||||||
if (countRetrievedAccounts == countAccountsSupportingRetrievingTransactions) {
|
if (countRetrievedAccounts == countAccountsSupportingRetrievingTransactions) {
|
||||||
addAccountDone(bank, getAccountsResponse, retrievedAccountData, callback)
|
addAccountDone(bank, getAccountsResponse, retrievedAccountData, callback)
|
||||||
|
|
|
@ -240,7 +240,8 @@ open class FinTsJobExecutor(
|
||||||
getAndHandleResponseForMessage(message, dialogContext) { response ->
|
getAndHandleResponseForMessage(message, dialogContext) { response ->
|
||||||
closeDialog(dialogContext)
|
closeDialog(dialogContext)
|
||||||
|
|
||||||
val successful = response.successful && (parameter.alsoRetrieveBalance == false || balance != null)
|
val successful = response.tanRequiredButWeWereToldToAbortIfSo
|
||||||
|
|| (response.successful && (parameter.alsoRetrieveBalance == false || balance != null))
|
||||||
val fromDate = parameter.fromDate
|
val fromDate = parameter.fromDate
|
||||||
?: parameter.account.countDaysForWhichTransactionsAreKept?.let { Date.today.addDays(it * -1) }
|
?: parameter.account.countDaysForWhichTransactionsAreKept?.let { Date.today.addDays(it * -1) }
|
||||||
?: bookedTransactions.map { it.valueDate }.sortedBy { it.millisSinceEpoch }.firstOrNull()
|
?: bookedTransactions.map { it.valueDate }.sortedBy { it.millisSinceEpoch }.firstOrNull()
|
||||||
|
|
Loading…
Reference in New Issue