diff --git a/tests/pairing.rs b/tests/pairing.rs index 3e2ef31..a4917de 100644 --- a/tests/pairing.rs +++ b/tests/pairing.rs @@ -196,10 +196,12 @@ fn test_pairing() { debug!("bob_parsed_pcd: {:#?}", bob_parsed_pcd_return); + let (root_commitment, prd_update) = bob_parsed_pcd_return.updated_process.unwrap(); + // At this point, user must validate the pairing proposal received from Alice // We decrypt the content of the pcd so that we can display to user what matters let alice_proposal = - get_update_proposals(bob_parsed_pcd_return.updated_process.unwrap().0).unwrap(); + get_update_proposals(root_commitment.clone()).unwrap(); debug!("Alice proposal: {:#?}", alice_proposal); @@ -254,10 +256,12 @@ fn test_pairing() { // we can now show all the addresses + pairing tx to the user on device to prompt confirmation debug!("Bob pairs device with Alice"); - pair_device(pairing_tx.to_owned(), proposal_members).unwrap(); + pair_device(pairing_tx.to_owned(), proposal_members.clone()).unwrap(); + + let prd_to_respond = prd_update.get_impending_requests().get(0).unwrap().to_string(); // Bob signs the proposal and sends a prd response too - let bob_prd_response = response_prd(root_commitment, prd_update.get_impending_requests().get(0).unwrap().to_string(), true) + let bob_prd_response = response_prd(root_commitment, prd_to_respond, true) .unwrap() .ciphers_to_send .get(0)