diff --git a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRate.kt b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRate.kt index 241204131..f33cdd4d0 100644 --- a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRate.kt +++ b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRate.kt @@ -19,9 +19,9 @@ class ApiFeeRate(networkType: BitcoinKit.NetworkType) { val btcRates = json.get("rates").asObject().get(coinCode).asObject() val rate = FeeRate().apply { - lowPriority = btcRates["low_priority"].asString().toDouble() - mediumPriority = btcRates["medium_priority"].asString().toDouble() - highPriority = btcRates["high_priority"].asString().toDouble() + lowPriority = btcRates["low_priority"].asDouble() + mediumPriority = btcRates["medium_priority"].asDouble() + highPriority = btcRates["high_priority"].asDouble() date = json["time"].asLong() dateStr = json["time_str"].asString() } diff --git a/bitcoinkit/src/test/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRateTest.kt b/bitcoinkit/src/test/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRateTest.kt index 95fc55d74..e7be4b0f1 100644 --- a/bitcoinkit/src/test/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRateTest.kt +++ b/bitcoinkit/src/test/kotlin/io/horizontalsystems/bitcoinkit/managers/ApiFeeRateTest.kt @@ -29,9 +29,9 @@ class ApiFeeRateTest { } private val coinJsonObject = JsonObject().apply { - this.add("low_priority", feeRate.lowPriority.toString()) - this.add("medium_priority", feeRate.mediumPriority.toString()) - this.add("high_priority", feeRate.highPriority.toString()) + this.add("low_priority", feeRate.lowPriority.toInt()) + this.add("medium_priority", feeRate.mediumPriority.toInt()) + this.add("high_priority", feeRate.highPriority.toInt()) } private val btcJsonObject = JsonObject().add("BTC", coinJsonObject)