[bug] update_value also update the state_id

This commit is contained in:
NicolasCantu 2025-02-07 22:38:18 +01:00
parent 5fc2764bbf
commit 855cd948ef

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())?;