[tests/pairing] Add Alice and Bob secrets store
This commit is contained in:
parent
2910125bd1
commit
7ba532cebe
@ -10,6 +10,8 @@ use sdk_common::sp_client::bitcoin::consensus::deserialize;
|
||||
use sdk_common::sp_client::bitcoin::hex::FromHex;
|
||||
use sdk_common::sp_client::bitcoin::{OutPoint, Transaction};
|
||||
use sdk_common::sp_client::spclient::OwnedOutput;
|
||||
use sdk_common::sp_client::silentpayments::utils::SilentPaymentAddress;
|
||||
use sdk_common::secrets::SecretsStore;
|
||||
use serde_json::{json, Value};
|
||||
|
||||
use tsify::JsValueSerdeExt;
|
||||
@ -26,6 +28,8 @@ fn test_pairing() {
|
||||
setup();
|
||||
let mut alice_process_cache = HashMap::new();
|
||||
let mut bob_process_cache = HashMap::new();
|
||||
let mut alice_secrets_store = SecretsStore::new();
|
||||
let mut bob_secrets_store = SecretsStore::new();
|
||||
|
||||
debug!("==============================================\nStarting test_pairing\n==============================================");
|
||||
|
||||
@ -39,6 +43,11 @@ fn test_pairing() {
|
||||
// we scan the qr code or get the address by any other means
|
||||
let bob_address = helper_get_bob_address();
|
||||
|
||||
// we add some shared_secret in both secrets_store
|
||||
let shared_secret = "c3f1a64e15d2e8d50f852c20b7f0b47cbe002d9ef80bc79582d09d6f38612d45";
|
||||
alice_secrets_store.confirm_secret_for_address(shared_secret, bob_address.try_into().unwrap());
|
||||
bob_secrets_store.confirm_secret_for_address(shared_secret, alice_address.try_into().unwrap());
|
||||
|
||||
// Alice creates the new member with Bob address
|
||||
let new_member = Member::new(vec![
|
||||
alice_address.as_str().try_into().unwrap(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user