[bug] update_value also update the state_id

This commit is contained in:
NicolasCantu 2025-02-07 22:38:18 +01:00 committed by Nicolas Cantu
parent 12d8923ea3
commit ab1c16ff81

View File

@ -83,6 +83,9 @@ impl ProcessState {
// Todo for now we rehash everything, which is a bit wasteful but fine for a proto
// Update state_id
self.state_id = self.pcd_commitment.create_merkle_tree()?.root().unwrap().to_lower_hex_string();
// Update the encrypted value
Value::Object(clear_pcd).encrypt_fields(&[key.to_string()], &mut self.keys, self.encrypted_pcd.as_object_mut().unwrap())?;