Skip to content
Snippets Groups Projects
Commit 530bd7e3 authored by Éloïs's avatar Éloïs
Browse files

[fix] core: identities response must return IdentityDocument vector

parent 4e902403
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ pub enum BlockchainResponse { ...@@ -69,7 +69,7 @@ pub enum BlockchainResponse {
/// Usernames corresponding to the public keys in parameter /// Usernames corresponding to the public keys in parameter
UIDs(ModuleReqId, HashMap<PubKey, Option<String>>), UIDs(ModuleReqId, HashMap<PubKey, Option<String>>),
/// Identities /// Identities
Identities(ModuleReqId, Vec<DALIdentity>), Identities(ModuleReqId, Vec<IdentityDocument>),
} }
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
//! Sub-module managing the inter-modules requests received. //! Sub-module managing the inter-modules requests received.
use crate::*; use crate::*;
use dubp_documents::documents::identity::IdentityDocument;
use duniter_module::*; use duniter_module::*;
use durs_message::requests::*; use durs_message::requests::*;
...@@ -90,7 +91,10 @@ pub fn receive_req( ...@@ -90,7 +91,10 @@ pub fn receive_req(
filters, filters,
bc.current_blockstamp.id, bc.current_blockstamp.id,
) )
.expect("Fatal error : get_identities: Fail to read IdentitiesDB !"); .expect("Fatal error : get_identities: Fail to read IdentitiesDB !")
.into_iter()
.map(|dal_idty| dal_idty.idty_doc)
.collect::<Vec<IdentityDocument>>();
responses::sent::send_req_response( responses::sent::send_req_response(
bc, bc,
req_from, req_from,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment