From 4e921c3b5c47de289aae3f2f42b904836b4ea8e7 Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 14 Nov 2024 13:34:16 +0700 Subject: [PATCH] Revert "Revert "fix: primitive len"" This reverts commit cea81026c96ceceee1650ecbdb0e9c7940982326. --- crates/dojo/types/src/primitive.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/dojo/types/src/primitive.rs b/crates/dojo/types/src/primitive.rs index 997613d1b6..5c803ed614 100644 --- a/crates/dojo/types/src/primitive.rs +++ b/crates/dojo/types/src/primitive.rs @@ -205,12 +205,12 @@ impl Primitive { Primitive::Bool(bool) => format!("{}", bool.unwrap_or_default() as i32), // Hex string - Primitive::I128(i128) => format!("{:#064x}", i128.unwrap_or_default()), - Primitive::ContractAddress(felt) => format!("{:#064x}", felt.unwrap_or_default()), - Primitive::ClassHash(felt) => format!("{:#064x}", felt.unwrap_or_default()), - Primitive::Felt252(felt) => format!("{:#064x}", felt.unwrap_or_default()), - Primitive::U128(u128) => format!("{:#064x}", u128.unwrap_or_default()), - Primitive::U64(u64) => format!("{:#064x}", u64.unwrap_or_default()), + Primitive::I128(i128) => format!("0x{:064x}", i128.unwrap_or_default()), + Primitive::ContractAddress(felt) => format!("0x{:064x}", felt.unwrap_or_default()), + Primitive::ClassHash(felt) => format!("0x{:064x}", felt.unwrap_or_default()), + Primitive::Felt252(felt) => format!("0x{:064x}", felt.unwrap_or_default()), + Primitive::U128(u128) => format!("0x{:064x}", u128.unwrap_or_default()), + Primitive::U64(u64) => format!("0x{:064x}", u64.unwrap_or_default()), Primitive::U256(u256) => format!("0x{:064x}", u256.unwrap_or_default()), }