From 9d5826ac3c88519f482acdaf609126689bb09249 Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 7 Sep 2024 00:02:15 +0200 Subject: [PATCH] Fixed mapping retrieveAllTransactions --- .../kotlin/net/codinux/banking/ui/service/BankingService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt index 80e94cc..7eaa7cb 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt @@ -73,8 +73,8 @@ class BankingService( suspend fun addAccount(bank: BankInfo, loginName: String, password: String, retrieveAllTransactions: Boolean = false): Boolean { try { - val options = GetAccountDataOptions(retrieveTransactions = RetrieveTransactions.All) - val response = client.getAccountDataAsync(GetAccountDataRequest(bank.bankCode, loginName, password, options)) + val retrieveTransactions = if (retrieveAllTransactions) RetrieveTransactions.All else RetrieveTransactions.OfLast90Days + val response = client.getAccountDataAsync(GetAccountDataRequest(bank.bankCode, loginName, password, GetAccountDataOptions(retrieveTransactions))) if (response.type == ResponseType.Success && response.data != null) { handleSuccessfulGetAccountDataResponse(response.data!!)