Tiny fix to get rid of warning

This commit is contained in:
Sad Ellie 2022-05-09 14:46:24 +03:00
parent 35504f7927
commit fbe1217456

View File

@ -22,7 +22,7 @@ class CurrencyAdapter {
@Suppress("UNUSED", "UNUSED_PARAMETER") @Suppress("UNUSED", "UNUSED_PARAMETER")
@ToJson fun toJson(card: CurrencyUnitResponse): String? = null @ToJson fun toJson(card: CurrencyUnitResponse): String? = null
@Suppress("UNCHECKED_CAST") @Suppress("UNUSED", "UNCHECKED_CAST")
@FromJson fun fromJson(response: Map<String, Any>): CurrencyUnitResponse { @FromJson fun fromJson(response: Map<String, Any>): CurrencyUnitResponse {
val pairsBD: Map<String, BigDecimal> = (response[response.keys.elementAt(1)] as Map<String, Double>) val pairsBD: Map<String, BigDecimal> = (response[response.keys.elementAt(1)] as Map<String, Double>)
.mapValues { it.value.toBigDecimal() } .mapValues { it.value.toBigDecimal() }