From 36391c8f20a8012806eee51de7c545dfca2ee568 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 3 Sep 2024 22:31:05 +0200 Subject: [PATCH] Also updating retrievedTransactionsFrom on BankAccount --- .../net/codinux/banking/client/fints4k/FinTs4kMapper.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt index 5bfa9e73..60ed58c1 100644 --- a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt +++ b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt @@ -84,6 +84,10 @@ open class FinTs4kMapper { if (finTsBankAccount.lastTransactionsRetrievalTime != null) { account.lastTransactionsRetrievalTime = finTsBankAccount.lastTransactionsRetrievalTime } + if (account.retrievedTransactionsFrom == null || (finTsBankAccount.retrievedTransactionsFrom != null + && account.retrievedTransactionsFrom!! < finTsBankAccount.retrievedTransactionsFrom!!)) { + account.retrievedTransactionsFrom = finTsBankAccount.retrievedTransactionsFrom + } Response.success(GetTransactionsResponse(account, mapAmount(finTsBankAccount.balance), mapBookedTransactions(finTsBankAccount), emptyList(), finTsBankAccount.lastTransactionsRetrievalTime ?: Clock.System.now(), param.retrieveTransactionsFrom, param.retrieveTransactionsTo))