Skip to content

Commit

Permalink
Merge pull request #1025 from breez/savage-rn-f32-fix
Browse files Browse the repository at this point in the history
Fix handling of f32 type
  • Loading branch information
dangeross authored Jun 27, 2024
2 parents 156f7a4 + 32c8677 commit 70d9651
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4466,6 +4466,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)
Expand Down

0 comments on commit 70d9651

Please sign in to comment.