diff --git a/src/brc20/operation/mod.rs b/src/brc20/operation/mod.rs index 0501fa8840..08da43b775 100644 --- a/src/brc20/operation/mod.rs +++ b/src/brc20/operation/mod.rs @@ -21,13 +21,7 @@ pub enum Operation { } pub fn deserialize_brc20(s: &str) -> Result { - let mut value: Value = serde_json::from_str(s).map_err(|_| JSONError::InvalidJson)?; - let entry = value.as_object_mut().ok_or(JSONError::InvalidJson)?; - *entry = std::mem::take(entry) - .into_iter() - .map(|(k, v)| (k.to_lowercase(), v)) - .collect(); - + let value: Value = serde_json::from_str(s).map_err(|_| JSONError::InvalidJson)?; if value.get("p") != Some(&json!(PROTOCOL_LITERAL)) { return Err(JSONError::NotBRC20Json); } @@ -135,14 +129,6 @@ mod tests { }}"## ); - assert_eq!( - deserialize_brc20(&json_str).unwrap(), - Operation::Deploy(Deploy { - tick: "ordi".to_string(), - max_supply, - mint_limit: Some(mint_limit), - decimals: None - }) - ); + assert_eq!(deserialize_brc20(&json_str), Err(JSONError::NotBRC20Json)); } }