Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Rothenberger committed Nov 20, 2023
1 parent 360a0eb commit 15172c9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/vc_util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,8 @@ pub fn principal_for_did(did: &str) -> Result<Principal, String> {
did, DID_ICP_PREFIX
));
}
Principal::from_text(did.trim_start_matches(DID_ICP_PREFIX)).map_err(|e| {
format!(
"failed to parse DID: {}",
PrincipalError::from(e).to_string()
)
})
Principal::from_text(did.trim_start_matches(DID_ICP_PREFIX))
.map_err(|e| format!("failed to parse DID: {}", e))
}

/// Verifies the given JWS-credential as an id_alias-VC and extracts the alias tuple.
Expand Down

0 comments on commit 15172c9

Please sign in to comment.