From a5e809ff6893e3ab6211094fdede6c189fd770b3 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 15 Oct 2024 13:50:13 +0200 Subject: [PATCH] Updated to new fints4k model that now contains serializedFinTsModel --- .../codinux/banking/client/fints4k/FinTs4kMapper.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 530fcf5e..729b5c08 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 @@ -33,7 +33,6 @@ import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanGe import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMediumStatus import net.codinux.banking.fints.model.* -import net.codinux.banking.fints.serialization.FinTsModelSerializer import net.codinux.banking.fints.transactions.swift.model.Holding import net.dankito.banking.banklistcreator.prettifier.BankingGroupMapper import net.dankito.banking.client.model.parameter.TransferMoneyParameter @@ -44,8 +43,6 @@ open class FinTs4kMapper { protected val fintsModelMapper = FinTsModelMapper() - protected val serializer = FinTsModelSerializer() - protected val bankingGroupMapper = BankingGroupMapper() @@ -74,13 +71,12 @@ open class FinTs4kMapper { // val preferredTanMethods = listOf(mapTanMethodType(bank.selectedTanMethod.type)) // TODO: currently we aren't saving TanMethods in database, re-enable as soon as TanMethods get saved val preferredTanMethods = defaults.preferredTanMethods?.map { mapTanMethodType(it) } - val actualFinTsModel = finTsModel ?: bank.clientData?.let { serializer.deserializeFromJson(it) } - return GetAccountDataParameter(bank.domesticBankCode, bank.loginName, bank.password!!, listOf(accountIdentifier), true, retrieveTransactions, from, preferredTanMethods = preferredTanMethods, preferredTanMedium = bank.selectedTanMediumIdentifier, - finTsModel = actualFinTsModel + finTsModel = finTsModel, + serializedFinTsModel = bank.clientData ) } @@ -400,7 +396,7 @@ open class FinTs4kMapper { mapToMoney(request.amount, request.currency), request.paymentReference, request.instantTransfer, request.preferredTanMethods?.map { mapTanMethodType(it) }, request.tanMethodsNotSupportedByApplication.map { mapTanMethodType(it) }, - finTsModel = request.clientData?.let { serializer.deserializeFromJson(it) } + serializedFinTsModel = request.clientData ) open fun mapTransferMoneyResponse(response: net.dankito.banking.client.model.response.TransferMoneyResponse, bank: BankAccess? = null, account: BankAccount? = null): Response =