Skip to content

Commit

Permalink
fix: pin dag
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 9, 2024
1 parent ad7e740 commit 1c72ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/warp-ipfs/src/shuttle/store/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ impl IdentityStorageInner {

async fn register(&mut self, document: &IdentityDocument, root_cid: Cid) -> Result<(), Error> {
document.verify()?;

let mut list: BTreeMap<String, Cid> = match self.users {
Some(cid) => self
.ipfs
Expand All @@ -151,6 +150,8 @@ impl IdentityStorageInner {

let cid = self.ipfs.put_dag(list).await?;

self.ipfs.insert_pin(cid).recursive().await?;

let old_cid = self.users.replace(cid);

if let Some(old_cid) = old_cid {
Expand Down

0 comments on commit 1c72ebb

Please sign in to comment.