diff --git a/lib/bindings/langs/react-native/src/gen_kotlin/mod.rs b/lib/bindings/langs/react-native/src/gen_kotlin/mod.rs index 0eaf099..3000442 100644 --- a/lib/bindings/langs/react-native/src/gen_kotlin/mod.rs +++ b/lib/bindings/langs/react-native/src/gen_kotlin/mod.rs @@ -212,7 +212,7 @@ pub mod filters { Type::Int32 => format!("{name}.getInt(\"{field_name}\")"), Type::UInt64 => format!("{name}.getDouble(\"{field_name}\").toULong()"), Type::Int64 => format!("{name}.getDouble(\"{field_name}\").toLong()"), - Type::Float32 => format!("{name}.getDouble(\"{field_name}\")"), + Type::Float32 => format!("{name}.getDouble(\"{field_name}\").toFloat()"), Type::Float64 => format!("{name}.getDouble(\"{field_name}\")"), Type::Boolean => format!("{name}.getBoolean(\"{field_name}\")"), Type::String => format!("{name}.getString(\"{field_name}\"){mandatory_suffix}"), diff --git a/lib/bindings/langs/react-native/src/gen_kotlin/templates/Helpers.kt b/lib/bindings/langs/react-native/src/gen_kotlin/templates/Helpers.kt index 7be9f00..2a115ff 100644 --- a/lib/bindings/langs/react-native/src/gen_kotlin/templates/Helpers.kt +++ b/lib/bindings/langs/react-native/src/gen_kotlin/templates/Helpers.kt @@ -36,6 +36,7 @@ fun pushToMap(map: WritableMap, key: String, value: Any?) { 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) diff --git a/packages/react-native/android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt b/packages/react-native/android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt index c59caa7..b2af96f 100644 --- a/packages/react-native/android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt +++ b/packages/react-native/android/src/main/java/com/breezliquidsdk/BreezLiquidSDKMapper.kt @@ -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)