diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/mapper/ModelMapper.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/mapper/ModelMapper.kt index 66c1c327..e797f550 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/mapper/ModelMapper.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/mapper/ModelMapper.kt @@ -37,8 +37,9 @@ open class ModelMapper( bank.pinInfo = pinInfo } - response.getFirstSegmentById(InstituteSegmentId.TanInfo)?.let { tanInfo -> - bank.tanMethodsSupportedByBank = mapToTanMethods(tanInfo) + val tanInfos = response.getSegmentsById(InstituteSegmentId.TanInfo) + if (tanInfos.isNotEmpty()) { + bank.tanMethodsSupportedByBank = tanInfos.flatMap { tanInfo -> mapToTanMethods(tanInfo) } } response.getFirstSegmentById(InstituteSegmentId.CommunicationInfo)?.let { communicationInfo ->