Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Oct 30, 2024
1 parent ee6c302 commit 14c5c85
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
1 change: 0 additions & 1 deletion xmtp_mls/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ where
let ClientBuilder {
mut store,
identity_strategy,
#[cfg(feature = "message-history")]
history_sync_url,
mut scw_verifier,
..
Expand Down
33 changes: 33 additions & 0 deletions xmtp_mls/src/utils/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl ClientBuilder<TestClient, MockSmartContractSignatureVerifier> {
owner: impl InboxOwner,
) -> Client<TestClient, MockSmartContractSignatureVerifier> {
let api_client = <TestClient as XmtpTestClient>::create_dev().await;

build_with_verifier(
owner,
api_client,
Expand Down Expand Up @@ -151,6 +152,37 @@ impl ClientBuilder<TestClient> {
}

async fn inner_build<A>(owner: impl InboxOwner, api_client: A) -> Client<A>
where
A: XmtpApi,
{
let nonce = 1;
let inbox_id = generate_inbox_id(&owner.get_address(), &nonce);

let client = Client::<A>::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<A, V>(
owner: impl InboxOwner,
api_client: A,
scw_verifier: V,
) -> Client<A, V>
where
A: XmtpApi,
V: SmartContractSignatureVerifier,
Expand Down Expand Up @@ -178,6 +210,7 @@ where

client
}

/// wrapper over a `Notify` with a 60-scond timeout for waiting
#[derive(Clone, Default)]
pub struct Delivery {
Expand Down
1 change: 0 additions & 1 deletion xmtp_proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 14c5c85

Please sign in to comment.