diff --git a/crates/torii/core/src/model.rs b/crates/torii/core/src/model.rs index 5030128013..2b2c8f0bc8 100644 --- a/crates/torii/core/src/model.rs +++ b/crates/torii/core/src/model.rs @@ -270,11 +270,10 @@ pub fn map_row_to_ty( let value = row.try_get::(column_name)?; let hex_str = value.trim_start_matches("0x"); - if !hex_str.is_empty() { - primitive.set_i128(Some( - i128::from_str_radix(hex_str, 16).map_err(ParseError::ParseIntError)?, - ))?; - } + primitive.set_i128(Some( + u128::from_str_radix(hex_str, 16).map_err(ParseError::ParseIntError)? + as i128, + ))?; } Primitive::U8(_) => { let value = row.try_get::(column_name)?;