From c0e9db7234d6ab9706efd1309b73599915f3cb3a Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 4 Oct 2024 06:33:13 +0200 Subject: [PATCH] Updating balance --- .../net/codinux/banking/client/fints4k/FinTs4kMapper.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 f279d5fc..a78e01ad 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 @@ -109,7 +109,10 @@ open class FinTs4kMapper { account.retrievedTransactionsFrom = finTsBankAccount.retrievedTransactionsFrom } - Response.success(GetTransactionsResponse(account, mapMoney(finTsBankAccount.balance), mapBookedTransactions(finTsBankAccount), emptyList(), + val balance = mapMoney(finTsBankAccount.balance) + account.balance = balance + + Response.success(GetTransactionsResponse(account, balance, mapBookedTransactions(finTsBankAccount), emptyList(), mapHoldings(finTsBankAccount.statementOfHoldings, finTsBankAccount.currency, finTsBankAccount.lastAccountUpdateTime), finTsBankAccount.lastAccountUpdateTime ?: Clock.System.now(), param.retrieveTransactionsFrom, param.retrieveTransactionsTo)) } else {