diff --git a/extensions/warp-ipfs/src/store/document.rs b/extensions/warp-ipfs/src/store/document.rs index 663e665b3..19f98e14f 100644 --- a/extensions/warp-ipfs/src/store/document.rs +++ b/extensions/warp-ipfs/src/store/document.rs @@ -137,6 +137,11 @@ impl RootDocument { let mut root_document = self.clone(); //In case there is a signature already exist root_document.signature = None; + if root_document.created.is_none() { + root_document.created = Some(Utc::now()); + } + root_document.modified = Some(Utc::now()); + let bytes = serde_json::to_vec(&root_document)?; let signature = did.sign(&bytes); self.signature = Some(bs58::encode(signature).into_string());