Fixed retrieving medium name (had to take remainingDataElements not dataElements)
This commit is contained in:
parent
8bf7b24548
commit
e5c1fa2b50
|
@ -546,12 +546,13 @@ open class ResponseParser(
|
|||
}
|
||||
|
||||
val status = parseCodeEnum(dataElements[1], TanMediumStatus.values())
|
||||
val mediumName = if (hitabVersion < 2) null else parseStringToNullIfEmpty(dataElements[10])
|
||||
|
||||
// TODO: may also parse 'Letzte Benutzung' (second last element) and 'Freigeschaltet am' (last element)
|
||||
|
||||
val remainingDataElements = dataElements.subList(2, dataElements.size)
|
||||
|
||||
val mediumName = if (hitabVersion < 2) null else parseStringToNullIfEmpty(remainingDataElements[10])
|
||||
|
||||
return when (mediumClass) {
|
||||
TanMediumKlasse.TanGenerator -> parseTanGeneratorTanMedium(mediumClass, status, mediumName, hitabVersion, remainingDataElements)
|
||||
TanMediumKlasse.MobiltelefonMitMobileTan -> parseMobilePhoneTanMedium(mediumClass, status, mediumName, hitabVersion, remainingDataElements)
|
||||
|
|
Loading…
Reference in New Issue