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 8598b9fc..e81b6400 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 @@ -412,7 +412,7 @@ open class FinTs4kMapper { open fun mapToMoney(amount: Amount, currency: String): Money = Money(amount.toString(), currency) - open fun mapMessageLog(response: net.dankito.banking.client.model.response.FinTsClientResponse, bank: BankAccess? = null, account: BankAccount? = null) = + open fun mapMessageLog(response: FinTsClientResponse, bank: BankAccess? = null, account: BankAccount? = null) = mapMessageLog(response.messageLog, bank, account) open fun mapMessageLog(messageLog: List, bank: BankAccess? = null, account: BankAccount? = null) = @@ -422,7 +422,7 @@ open class FinTs4kMapper { // TODO: may map messageLogEntry.context.BankData to BankAccess val context = messageLogEntry.context val fintsAccount = context.account - val effectiveAccount = account ?: bank?.accounts?.firstOrNull { it.identifier == fintsAccount?.accountIdentifier && it.subAccountNumber == fintsAccount?.subAccountAttribute } + val effectiveAccount = account ?: bank?.accounts?.firstOrNull { it.identifier == fintsAccount?.accountIdentifier && it.subAccountNumber == fintsAccount.subAccountAttribute } val messageNumberString = "${context.jobNumber.toString().padStart(2, '0')}_${context.dialogNumber.toString().padStart(2, '0')}_${context.messageNumber.toString().padStart(2, '0')}" @@ -443,7 +443,7 @@ open class FinTs4kMapper { } - protected open fun mapError(response: net.dankito.banking.client.model.response.FinTsClientResponse, messageLog: List): Response = + protected open fun mapError(response: FinTsClientResponse, messageLog: List): Response = if (response.error != null) { Response.error(ErrorType.valueOf(response.error!!.name), if (response.error == ErrorCode.BankReturnedError) null else response.errorMessage, if (response.error == ErrorCode.BankReturnedError && response.errorMessage !== null) listOf(response.errorMessage!!) else emptyList(), messageLog)