diff --git a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs
index bb341c68088..a14a7c05836 100644
--- a/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs
+++ b/crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs
@@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-use std::ops::Deref;
-
-use async_trait::async_trait;
use ruma::UserId;
use tracing::error;
use vodozemac::Curve25519PublicKey;
@@ -22,8 +19,7 @@ use vodozemac::Curve25519PublicKey;
use super::{SenderData, SenderDataRetryDetails};
use crate::{
error::OlmResult,
- identities::Device,
- store::{self, Store},
+ store::Store,
types::{events::olm_v1::DecryptedRoomKeyEvent, DeviceKeys, MasterPubkey},
EventError, OlmError, OlmMachine, ReadOnlyDevice, ReadOnlyOwnUserIdentity,
ReadOnlyUserIdentities,
@@ -34,12 +30,12 @@ use crate::{
///
/// The letters A, B etc. in the documentation refer to the algorithm described
/// in https://github.com/matrix-org/matrix-rust-sdk/issues/3543
-pub(crate) struct SenderDataFinder<'a, S: FinderCryptoStore> {
- own_crypto_store: &'a S,
+pub(crate) struct SenderDataFinder<'a> {
+ own_crypto_store: &'a Store,
own_user_id: &'a UserId,
}
-impl<'a> SenderDataFinder<'a, Store> {
+impl<'a> SenderDataFinder<'a> {
/// As described in https://github.com/matrix-org/matrix-rust-sdk/issues/3543
/// and https://github.com/matrix-org/matrix-rust-sdk/issues/3544
/// find the device info associated with the to-device message used to
@@ -70,9 +66,7 @@ impl<'a> SenderDataFinder<'a, Store> {
};
finder.have_device_keys(&device_keys).await
}
-}
-impl<'a, S: FinderCryptoStore> SenderDataFinder<'a, S> {
async fn have_event(
&self,
sender_curve_key: Curve25519PublicKey,
@@ -347,56 +341,20 @@ impl<'a, S: FinderCryptoStore> SenderDataFinder<'a, S> {
}
}
-#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
-#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
-pub(crate) trait FinderCryptoStore {
- async fn get_device_from_curve_key(
- &self,
- user_id: &UserId,
- curve_key: Curve25519PublicKey,
- ) -> store::Result