Skip to content

Commit

Permalink
chore: Remove redundant calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Oct 11, 2023
1 parent c6eb7f1 commit 95271ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions extensions/warp-ipfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,6 @@ impl MultiPass for WarpIpfs {
}
}

info!("Update identity store");
store.update_identity().await?;
store.push_to_all().await;

Ok(())
Expand Down
13 changes: 2 additions & 11 deletions extensions/warp-ipfs/src/store/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,6 @@ impl IdentityStore {

self.root_document.set(document).await?;

self.update_identity().await?;

log::info!("Loading friends list into phonebook");
if let Ok(friends) = self.friends_list().await {
let phonebook = self.phonebook();
Expand Down Expand Up @@ -1289,7 +1287,6 @@ impl IdentityStore {

let identity = identity.resolve()?;

self.update_identity().await?;
Ok(identity)
}

Expand Down Expand Up @@ -1439,9 +1436,9 @@ impl IdentityStore {
self.root_document
.set(root_document)
.await
.map(|_| log::debug!("Document updated"))
.map(|_| log::debug!("Root document updated"))
.map_err(|e| {
log::error!("Updating document failed: {e}");
log::error!("Updating root document failed: {e}");
e
})
}
Expand Down Expand Up @@ -1769,12 +1766,6 @@ impl IdentityStore {
Ok(())
}

pub async fn update_identity(&self) -> Result<(), Error> {
let ident = self.own_identity().await?;
self.validate_identity(&ident)?;
Ok(())
}

pub fn validate_identity(&self, identity: &Identity) -> Result<(), Error> {
{
let len = identity.username().chars().count();
Expand Down

0 comments on commit 95271ae

Please sign in to comment.