diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 392e547..2603715 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -342,5 +342,11 @@ fn format_hex(num: &U256) -> String { .trim_start_matches('0') .to_string(); + let stripped = if stripped.is_empty() { + "0".to_string() + } else { + stripped + }; + format!("0x{stripped}") }