fix pairing tests
This commit is contained in:
parent
4bd1393306
commit
6566f4c192
@ -196,10 +196,12 @@ fn test_pairing() {
|
|||||||
|
|
||||||
debug!("bob_parsed_pcd: {:#?}", bob_parsed_pcd_return);
|
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
|
// 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
|
// We decrypt the content of the pcd so that we can display to user what matters
|
||||||
let alice_proposal =
|
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);
|
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
|
// we can now show all the addresses + pairing tx to the user on device to prompt confirmation
|
||||||
|
|
||||||
debug!("Bob pairs device with Alice");
|
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
|
// 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()
|
.unwrap()
|
||||||
.ciphers_to_send
|
.ciphers_to_send
|
||||||
.get(0)
|
.get(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user