Fix handling of f32 type (#336)

This commit is contained in:
Ross Savage
2024-06-27 13:07:41 +02:00
committed by GitHub
parent 5023248545
commit a4af73352a
3 changed files with 4 additions and 2 deletions

View File

@@ -134,7 +134,7 @@ fun asConfig(config: ReadableMap): Config? {
val workingDir = config.getString("workingDir")!!
val network = config.getString("network")?.let { asLiquidNetwork(it) }!!
val paymentTimeoutSec = config.getDouble("paymentTimeoutSec").toULong()
val zeroConfMinFeeRate = config.getDouble("zeroConfMinFeeRate")
val zeroConfMinFeeRate = config.getDouble("zeroConfMinFeeRate").toFloat()
val zeroConfMaxAmountSat =
if (hasNonNullKey(
config,
@@ -2331,6 +2331,7 @@ fun pushToMap(
is Boolean -> map.putBoolean(key, value)
is Byte -> map.putInt(key, value.toInt())
is Double -> map.putDouble(key, value)
is Float -> map.putDouble(key, value.toDouble())
is Int -> map.putInt(key, value)
is Long -> map.putDouble(key, value.toDouble())
is ReadableArray -> map.putArray(key, value)