diff --git a/bindings_ffi/src/mls.rs b/bindings_ffi/src/mls.rs index 339c9c23e..4ac46b3c1 100644 --- a/bindings_ffi/src/mls.rs +++ b/bindings_ffi/src/mls.rs @@ -4,7 +4,6 @@ use crate::{FfiSubscribeError, GenericError}; use std::{collections::HashMap, convert::TryInto, sync::Arc}; use tokio::sync::Mutex; use xmtp_api_grpc::grpc_api_helper::Client as TonicApiClient; -use xmtp_common::retry::Retry; use xmtp_id::associations::verify_signed_with_public_context; use xmtp_id::scw_verifier::RemoteSignatureVerifier; use xmtp_id::{ @@ -155,18 +154,11 @@ pub async fn create_client( #[allow(unused)] #[uniffi::export(async_runtime = "tokio")] pub async fn get_inbox_id_for_address( - host: String, - is_secure: bool, + api: Arc, account_address: String, ) -> Result, GenericError> { - let api_client = ApiClientWrapper::new( - TonicApiClient::create(host.clone(), is_secure) - .await? - .into(), - Retry::default(), - ); - - let results = api_client + let api = ApiClientWrapper::new(Arc::new(api.0.clone()), Default::default()); + let results = api .get_inbox_ids(vec![account_address.clone()]) .await .map_err(GenericError::from_error)?; @@ -2136,8 +2128,9 @@ mod tests { let real_inbox_id = client.inbox_id(); let from_network = get_inbox_id_for_address( - xmtp_api_grpc::LOCALHOST_ADDRESS.to_string(), - false, + connect_to_backend(xmtp_api_grpc::LOCALHOST_ADDRESS.to_string(), false) + .await + .unwrap(), client.account_address.clone(), ) .await diff --git a/bindings_node/CHANGELOG.md b/bindings_node/CHANGELOG.md index 98fc50dc7..d80620ac7 100644 --- a/bindings_node/CHANGELOG.md +++ b/bindings_node/CHANGELOG.md @@ -1,5 +1,9 @@ # @xmtp/node-bindings +## 0.0.30 + +- Fixed issue that resulted in a forked group + ## 0.0.29 - Added support for custom permission policy sets diff --git a/bindings_node/package.json b/bindings_node/package.json index 4bc65d3e6..4f8433118 100644 --- a/bindings_node/package.json +++ b/bindings_node/package.json @@ -1,6 +1,6 @@ { "name": "@xmtp/node-bindings", - "version": "0.0.29", + "version": "0.0.30", "repository": { "type": "git", "url": "git+https://git@github.com/xmtp/libxmtp.git", diff --git a/bindings_wasm/CHANGELOG.md b/bindings_wasm/CHANGELOG.md index b55cfc295..727f22b02 100644 --- a/bindings_wasm/CHANGELOG.md +++ b/bindings_wasm/CHANGELOG.md @@ -1,5 +1,9 @@ # @xmtp/wasm-bindings +## 0.0.9 + +- Fixed issue that resulted in a forked group + ## 0.0.8 - Added support for custom permission policy sets diff --git a/bindings_wasm/package.json b/bindings_wasm/package.json index 82002185a..9565a29b4 100644 --- a/bindings_wasm/package.json +++ b/bindings_wasm/package.json @@ -1,6 +1,6 @@ { "name": "@xmtp/wasm-bindings", - "version": "0.0.8", + "version": "0.0.9", "type": "module", "license": "MIT", "description": "WASM bindings for the libXMTP rust library", diff --git a/xmtp_api_grpc/src/replication_client.rs b/xmtp_api_grpc/src/replication_client.rs index ee9a33141..e13b07adc 100644 --- a/xmtp_api_grpc/src/replication_client.rs +++ b/xmtp_api_grpc/src/replication_client.rs @@ -190,7 +190,7 @@ impl XmtpMlsClient for ClientV4 { .map(|key| build_key_package_topic(key.as_slice())) .collect(); - let envelopes = self.query_v4_envelopes(topics).await?; + let envelopes = self.query_v4_envelopes(topics, 0).await?; let key_packages: Result, Error> = envelopes .iter() .map(|envelopes| { @@ -248,7 +248,7 @@ impl XmtpMlsClient for ClientV4 { originator_node_ids: vec![], last_seen: None, }), - limit: 100, + limit: req.paging_info.map_or(0, |paging| paging.limit), }) .await .map_err(|e| Error::new(ErrorKind::MlsError).with(e))?; @@ -304,7 +304,7 @@ impl XmtpMlsClient for ClientV4 { originator_node_ids: vec![], last_seen: None, }), - limit: 100, + limit: req.paging_info.map_or(0, |paging| paging.limit), }) .await .map_err(|e| Error::new(ErrorKind::MlsError).with(e))?; @@ -418,7 +418,7 @@ impl XmtpIdentityClient for ClientV4 { .iter() .map(|r| build_identity_topic_from_hex_encoded(&r.inbox_id.clone())) .collect(); - let v4_envelopes = self.query_v4_envelopes(topics?).await?; + let v4_envelopes = self.query_v4_envelopes(topics?, 0).await?; let joined_data = v4_envelopes .into_iter() .zip(request.requests.into_iter()) @@ -466,6 +466,7 @@ impl ClientV4 { async fn query_v4_envelopes( &self, topics: Vec>, + limit: u32, ) -> Result>, Error> { let requests = topics.iter().map(|topic| async { let client = &mut self.client.clone(); @@ -476,7 +477,7 @@ impl ClientV4 { originator_node_ids: vec![], last_seen: None, }), - limit: 100, + limit, }) .await .map_err(|err| Error::new(ErrorKind::IdentityError).with(err))?;