Skip to content

Commit

Permalink
new identity in client (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
37ng authored and neekolas committed May 15, 2024
1 parent 8326244 commit 7cb0d8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion xmtp_mls/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use crate::{
refresh_state::EntityKind,
EncryptedMessageStore, StorageError,
},
types::Address,
verified_key_package::{KeyPackageVerificationError, VerifiedKeyPackage},
xmtp_openmls_provider::XmtpOpenMlsProvider,
Fetch, XmtpApi,
Expand Down
42 changes: 21 additions & 21 deletions xmtp_mls/src/groups/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,35 @@ pub fn aggregate_member_list(openmls_group: &OpenMlsGroup) -> Result<Vec<GroupMe

#[cfg(test)]
mod tests {
use xmtp_cryptography::utils::generate_local_wallet;
// use xmtp_cryptography::utils::generate_local_wallet;

use crate::builder::ClientBuilder;
// use crate::builder::ClientBuilder;

#[tokio::test]
#[ignore]
async fn test_member_list() {
let amal = ClientBuilder::new_test_client(&generate_local_wallet()).await;
let bola_wallet = generate_local_wallet();
// Add two separate installations for Bola
let bola_a = ClientBuilder::new_test_client(&bola_wallet).await;
let bola_b = ClientBuilder::new_test_client(&bola_wallet).await;
// let amal = ClientBuilder::new_test_client(&generate_local_wallet()).await;
// let bola_wallet = generate_local_wallet();
// // Add two separate installations for Bola
// let bola_a = ClientBuilder::new_test_client(&bola_wallet).await;
// let bola_b = ClientBuilder::new_test_client(&bola_wallet).await;

let group = amal.create_group(None).unwrap();
// let group = amal.create_group(None).unwrap();
// Add both of Bola's installations to the group
group
.add_members_by_installation_id(
vec![
bola_a.installation_public_key(),
bola_b.installation_public_key(),
],
&amal,
)
.await
.unwrap();
// group
// .add_members_by_installation_id(
// vec![
// bola_a.installation_public_key(),
// bola_b.installation_public_key(),
// ],
// &amal,
// )
// .await
// .unwrap();

let members = group.members().unwrap();
// The three installations should count as two members
assert_eq!(members.len(), 2);
// let members = group.members().unwrap();
// // The three installations should count as two members
// assert_eq!(members.len(), 2);

// for member in members {
// if member.account_address.eq(&amal.account_address()) {
Expand Down

0 comments on commit 7cb0d8e

Please sign in to comment.