From 14c5c85a408c9f973daba52b606a95d00b1346d6 Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Wed, 30 Oct 2024 16:50:17 -0400 Subject: [PATCH] merge --- xmtp_mls/src/builder.rs | 1 - xmtp_mls/src/utils/test/mod.rs | 33 +++++++++++++++++++++++++++++++++ xmtp_proto/Cargo.toml | 1 - 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/xmtp_mls/src/builder.rs b/xmtp_mls/src/builder.rs index 488468578..bb60d7082 100644 --- a/xmtp_mls/src/builder.rs +++ b/xmtp_mls/src/builder.rs @@ -167,7 +167,6 @@ where let ClientBuilder { mut store, identity_strategy, - #[cfg(feature = "message-history")] history_sync_url, mut scw_verifier, .. diff --git a/xmtp_mls/src/utils/test/mod.rs b/xmtp_mls/src/utils/test/mod.rs index 442279525..1effb52f0 100755 --- a/xmtp_mls/src/utils/test/mod.rs +++ b/xmtp_mls/src/utils/test/mod.rs @@ -119,6 +119,7 @@ impl ClientBuilder { owner: impl InboxOwner, ) -> Client { let api_client = ::create_dev().await; + build_with_verifier( owner, api_client, @@ -151,6 +152,37 @@ impl ClientBuilder { } async fn inner_build(owner: impl InboxOwner, api_client: A) -> Client +where + A: XmtpApi, +{ + let nonce = 1; + let inbox_id = generate_inbox_id(&owner.get_address(), &nonce); + + let client = Client::::builder(IdentityStrategy::CreateIfNotFound( + inbox_id, + owner.get_address(), + nonce, + None, + )); + + let client = client + .temp_store() + .await + .api_client(api_client) + .build() + .await + .unwrap(); + + register_client(&client, owner).await; + + client +} + +async fn build_with_verifier( + owner: impl InboxOwner, + api_client: A, + scw_verifier: V, +) -> Client where A: XmtpApi, V: SmartContractSignatureVerifier, @@ -178,6 +210,7 @@ where client } + /// wrapper over a `Notify` with a 60-scond timeout for waiting #[derive(Clone, Default)] pub struct Delivery { diff --git a/xmtp_proto/Cargo.toml b/xmtp_proto/Cargo.toml index 7a5924218..21ce62bf9 100644 --- a/xmtp_proto/Cargo.toml +++ b/xmtp_proto/Cargo.toml @@ -11,7 +11,6 @@ pbjson.workspace = true prost = { workspace = true, features = ["prost-derive"] } serde = { workspace = true } async-trait = "0.1" -openmls = { workspace = true, optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tonic = { workspace = true }