Skip to content

Commit

Permalink
feat(dataverse): allow no proof in vc parsing according to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Feb 17, 2024
1 parent dcab990 commit 6c56cd0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions contracts/okp4-dataverse/src/credential/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ pub enum InvalidCredentialError {
#[error("Missing issuance date")]
MissingIssuanceDate,

#[error("Missing proof, at least a supported one")]
MissingProof,

#[error("Invalid proof: {0}")]
InvalidProof(#[from] InvalidProofError),

Expand Down
4 changes: 0 additions & 4 deletions contracts/okp4-dataverse/src/credential/vc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ impl<'a> TryFrom<&'a Dataset<'a>> for VerifiableCredential<'a> {
let (proofs, proof_graphs): (Vec<Proof<'a>>, Vec<BlankNode<'a>>) =
Self::extract_proofs(dataset, id)?.into_iter().unzip();

if proofs.is_empty() {
return Err(InvalidCredentialError::MissingProof);
}

let mut unsecured_filter: Vec<QuadPattern<'_>> = proof_graphs
.into_iter()
.map(|g| (None, None, None, Some(Some(g.into()))).into())
Expand Down

0 comments on commit 6c56cd0

Please sign in to comment.