diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt index 9125a8d6..e1052fc9 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/responses/GetTransactionsResponse.kt @@ -12,6 +12,7 @@ open class GetTransactionsResponse( val unbookedTransactions: Map> = mapOf(), val balances: Map = mapOf(), error: Exception? = null, - userCancelledAction: Boolean = false + userCancelledAction: Boolean = false, + val tanRequiredButWeWereToldToAbortIfSo: Boolean = false ) : BankingClientResponse(isSuccessful, errorToShowToUser, error, userCancelledAction) diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt index b9bd7c6d..e0bc81d2 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt @@ -278,7 +278,9 @@ open class BankingPresenter( client.getTransactionsAsync(bankAccount, GetTransactionsParameter(true, fromDate, null, abortIfTanIsRequired, { receivedAccountsTransactionChunk(bankAccount, it) } )) { response -> - retrievedAccountTransactions(bankAccount, startDate, response) + if (response.tanRequiredButWeWereToldToAbortIfSo == false) { // don't call retrievedAccountTransactions() if aborted due to TAN required but we told client to abort if so + retrievedAccountTransactions(bankAccount, startDate, response) + } callback(response) } diff --git a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4kModelMapper.kt b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4kModelMapper.kt index 86097f6a..098bed42 100644 --- a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4kModelMapper.kt +++ b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4kModelMapper.kt @@ -53,7 +53,7 @@ open class fints4kModelMapper { mapOf(bankAccount to mapTransactions(bankAccount, response.bookedTransactions)), mapOf(), // TODO: map unbooked transactions response.balance?.let { mapOf(bankAccount to it) } ?: mapOf(), - response.exception, response.userCancelledAction) + response.exception, response.userCancelledAction, response.tanRequiredButWeWereToldToAbortIfSo) } open fun mapErrorToShowToUser(response: FinTsClientResponse): String? {