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 0e26e9d9..5f08ffa5 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 @@ -120,7 +120,8 @@ open class FinTs4kMapper { protected open fun mapUser(user: net.dankito.banking.client.model.CustomerAccount) = User( user.bankCode, user.loginName, user.password, user.bankName, user.bic, user.customerName, user.userId, - user.accounts.map { mapAccount(it) }, + user.accounts.map { mapAccount(it) }.sortedBy { it.type } + .onEachIndexed { index, bankAccount -> bankAccount.displayIndex = index }, user.selectedTanMethod?.securityFunction?.code, user.tanMethods.map { mapTanMethod(it) }, user.selectedTanMedium?.mediumName, user.tanMedia.map { mapTanMedium(it) },