From ef375fa1e50948be366820aff9bac24ecf01a042 Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 13 Jun 2024 20:10:13 -0400 Subject: [PATCH] refactor: ignore entity update with 0x0 hahshed key --- src/wasm/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wasm/mod.rs b/src/wasm/mod.rs index 777c362..ace60a2 100644 --- a/src/wasm/mod.rs +++ b/src/wasm/mod.rs @@ -855,6 +855,10 @@ impl Client { while let Some(update) = stream.next().await { let entity = update.expect("no updated entity"); + if entity.hashed_keys == FieldElement::ZERO { + continue; + } + let json_str = parse_entities_as_json_str(vec![entity]).to_string(); let _ = callback.call1( &JsValue::null(), @@ -892,6 +896,10 @@ impl Client { while let Some(update) = stream.next().await { let entity = update.expect("no updated entity"); + if entity.hashed_keys == FieldElement::ZERO { + continue; + } + let json_str = parse_entities_as_json_str(vec![entity]).to_string(); let _ = callback.call1( &JsValue::null(),