From f89de94aa73e5edc1778f71e4e51ce0b1a643413 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 15 Oct 2024 21:55:16 +0200 Subject: [PATCH] Little refactoring --- .../kotlin/net/codinux/banking/fints/FinTsClient.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsClient.kt index 6e8857df..f975334c 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/FinTsClient.kt @@ -56,12 +56,12 @@ open class FinTsClient( open suspend fun getAccountDataAsync(param: GetAccountDataParameter): GetAccountDataResponse { val basicAccountDataResponse = getRequiredDataToSendUserJobs(param) + val bank = basicAccountDataResponse.finTsModel - if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || basicAccountDataResponse.finTsModel == null) { + if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || bank == null) { return GetAccountDataResponse(basicAccountDataResponse.error, basicAccountDataResponse.errorMessage, null, - basicAccountDataResponse.messageLog, basicAccountDataResponse.finTsModel) + basicAccountDataResponse.messageLog, bank) } else { - val bank = basicAccountDataResponse.finTsModel!! return getAccountData(param, bank, bank.accounts, basicAccountDataResponse.messageLog) } }