Skip to content

Commit

Permalink
Fixed rebase errors
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <artem.ivanov@dsr-corporation.com>
  • Loading branch information
Artemkaaas committed Nov 22, 2023
1 parent d8ddd3b commit 2bb5960
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/data_types/w3c/credential_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use anoncreds_clsignatures::{
SignatureCorrectnessProofBytesProxy, Witness, WitnessBytesProxy,
};
use serde::Serialize;
use serde_json::Value;

#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down
1 change: 0 additions & 1 deletion src/services/w3c/credential_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ mod tests {
AttributeNames, CredentialDefinitionConfig, CredentialValues, MakeCredentialValues,
SignatureType,
};
use crate::utils::encoded_object::EncodedObject;
use crate::{issuer, ErrorKind};
use anoncreds_clsignatures::{
CredentialSignature as CLCredentialSignature,
Expand Down
2 changes: 1 addition & 1 deletion src/services/w3c/issuer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub fn create_credential(
rev_reg,
witness,
);
let proof = CredentialSignatureProof::new(signature);
let proof = CredentialSignatureProof::new(signature)?;

let mut credential = W3CCredential::new();
credential.set_issuer(cred_def.issuer_id.clone());
Expand Down
7 changes: 3 additions & 4 deletions src/services/w3c/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::data_types::w3c::presentation_proof::{
PredicateAttribute, PresentationProof, PresentationProofValue,
};
use crate::prover::{CLProofBuilder, _process_credential};
use crate::utils::encoded_object::EncodedObject;
use std::collections::HashMap;

/// Process an incoming credential in W3C form as received from the issuer.
Expand Down Expand Up @@ -129,7 +128,7 @@ pub fn process_credential(
signature.rev_reg,
signature.witness,
)
.encode();
.encode()?;

trace!("process_w3c_credential <<< ");

Expand Down Expand Up @@ -187,7 +186,7 @@ pub fn create_presentation(

let presentation_proof_value = PresentationProofValue::new(cl_proof.aggregated_proof);
let presentation_proof =
PresentationProof::new(presentation_proof_value, pres_req.nonce.to_string());
PresentationProof::new(presentation_proof_value, pres_req.nonce.to_string())?;

let mut presentation = W3CPresentation::new();
presentation.set_proof(presentation_proof);
Expand All @@ -198,7 +197,7 @@ pub fn create_presentation(
let mapping = build_mapping(pres_req, present)?;
let credential_subject = build_credential_subject(pres_req, present)?;
let proof_value = CredentialPresentationProofValue::new(sub_proof);
let proof = CredentialPresentationProof::new(proof_value, mapping, present.timestamp);
let proof = CredentialPresentationProof::new(proof_value, mapping, present.timestamp)?;
let verifiable_credential = W3CCredential {
credential_subject,
proof: OneOrMany::One(CredentialProof::AnonCredsCredentialPresentationProof(proof)),
Expand Down

0 comments on commit 2bb5960

Please sign in to comment.