diff --git a/src/api.rs b/src/api.rs index 73fa898..aa7fa2c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -91,7 +91,7 @@ pub enum DiffStatus { #[allow(non_camel_case_types)] pub struct UserDiff { pub process_id: String, - pub new_state_merkle_root: String, // TODO add a merkle proof that the new_value belongs to that state + pub state_id: String, // TODO add a merkle proof that the new_value belongs to that state pub value_commitment: String, pub field: String, pub description: Option, @@ -734,7 +734,7 @@ fn create_diffs(process: &Process, new_state: &ProcessState) -> AnyhowResult AnyhowResult = bob_diff_cache.iter() - .filter(|diff| diff.new_state_merkle_root == *new_state_id) + .filter(|diff| diff.state_id == *new_state_id) .map(|diff| { let encrypted_value = state.encrypted_pcd.as_object().unwrap().get(&diff.field).unwrap(); (diff.value_commitment.clone(), encrypted_value.clone())