Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqvq committed Mar 19, 2024
1 parent aef5f16 commit eaba7e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fastcrypto-zkp/src/bn254/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub async fn get_proof(
.await
.map_err(|_| FastCryptoError::InvalidInput)?;

// #[cfg(feature = "e2e")]
#[cfg(feature = "e2e")]
println!("get_proof response: {:?}", full_bytes);

let get_proof_response: ZkLoginInputsReader =
Expand Down
5 changes: 3 additions & 2 deletions fastcrypto-zkp/src/bn254/zk_login_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ pub fn verify_zk_login(
) -> Result<(), FastCryptoError> {
// Load the expected JWK based on (iss, kid).
let (iss, kid) = (input.get_iss().to_string(), input.get_kid().to_string());
let jwk_id = JwkId::new(iss.clone(), kid.clone());
let jwk = all_jwk
.get(&JwkId::new(iss.clone(), kid.clone()))
.get(&jwk_id)
.ok_or_else(|| {
FastCryptoError::GeneralError(format!("JWK not found ({} - {})", iss, kid))
FastCryptoError::GeneralError(format!("JWK not found ({:?})", jwk_id))

Check warning on line 237 in fastcrypto-zkp/src/bn254/zk_login_api.rs

View check run for this annotation

Codecov / codecov/patch

fastcrypto-zkp/src/bn254/zk_login_api.rs#L237

Added line #L237 was not covered by tests
})?;

// Decode modulus to bytes.
Expand Down

0 comments on commit eaba7e7

Please sign in to comment.