diff --git a/extensions/warp-ipfs/src/shuttle/identity/protocol.rs b/extensions/warp-ipfs/src/shuttle/identity/protocol.rs index e6c4ee190..373594fc4 100644 --- a/extensions/warp-ipfs/src/shuttle/identity/protocol.rs +++ b/extensions/warp-ipfs/src/shuttle/identity/protocol.rs @@ -185,7 +185,6 @@ pub enum RegisterError { #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum Synchronized { - PeerRecord { record: Vec }, Store { package: Cid }, Fetch, } diff --git a/extensions/warp-ipfs/src/shuttle/server.rs b/extensions/warp-ipfs/src/shuttle/server.rs index 5ca56efcd..09b15c537 100644 --- a/extensions/warp-ipfs/src/shuttle/server.rs +++ b/extensions/warp-ipfs/src/shuttle/server.rs @@ -724,106 +724,6 @@ impl ShuttleTask { _ = ipfs.pubsub_publish("/identity/announce/v0", bytes).await; } } - identity::protocol::Request::Synchronized(Synchronized::PeerRecord { .. }) => { - // let signed_envelope = match SignedEnvelope::from_protobuf_encoding(record) { - // Ok(signed_envelope) => signed_envelope, - // Err(e) => { - // let payload = payload_message_construct( - // keypair, - // None, - // Response::SynchronizedResponse( - // identity::protocol::SynchronizedResponse::Error( - // SynchronizedError::InvalidPayload { - // msg: e.to_string(), - // }, - // ), - // ), - // ) - // .expect("Valid payload construction"); - // if let (Some(ch), Some(resp)) = (ch.take(), resp.take()) { - // let _ = resp.send((ch, payload)); - // } - - // return; - // } - // }; - - // let record = match PeerRecord::from_signed_envelope(signed_envelope) { - // Ok(record) => record, - // Err(e) => { - // let payload = payload_message_construct( - // keypair, - // None, - // Response::SynchronizedResponse( - // identity::protocol::SynchronizedResponse::Error( - // SynchronizedError::InvalodRecord { msg: e.to_string() }, - // ), - // ), - // ) - // .expect("Valid payload construction"); - - // if let (Some(ch), Some(resp)) = (ch.take(), resp.take()) { - // let _ = resp.send((ch, payload)); - // } - - // return; - // } - // }; - - // let peer_id = record.peer_id(); - - // let Ok(did) = peer_id.to_did() else { - // tracing::warn!(%peer_id, "Could not convert to did key"); - // let payload = payload_message_construct( - // keypair, - // None, - // Response::SynchronizedResponse( - // identity::protocol::SynchronizedResponse::Error( - // SynchronizedError::Invalid, - // ), - // ), - // ) - // .expect("Valid payload construction"); - - // if let (Some(ch), Some(resp)) = (ch.take(), resp.take()) { - // let _ = resp.send((ch, payload)); - // } - - // return; - // }; - - // if !identity_storage.contains(&did).await { - // let payload = payload_message_construct( - // keypair, - // None, - // Response::SynchronizedResponse( - // identity::protocol::SynchronizedResponse::Error( - // SynchronizedError::NotRegistered, - // ), - // ), - // ) - // .expect("Valid payload construction"); - - // if let (Some(ch), Some(resp)) = (ch.take(), resp.take()) { - // let _ = resp.send((ch, payload)); - // } - - // return; - // } - - // _ = self.precord_tx.send(record).await; - - // let payload = payload_message_construct( - // keypair, - // None, - // Response::SynchronizedResponse(SynchronizedResponse::RecordStored), - // ) - // .expect("Valid payload construction"); - - // if let (Some(ch), Some(resp)) = (ch.take(), resp.take()) { - // let _ = resp.send((ch, payload)); - // } - } identity::protocol::Request::Synchronized(Synchronized::Fetch) => { let did = match payload.sender().to_did() { Ok(did) => did,