Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Fix: Change GET /public return type to String
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbenaron authored Jul 26, 2022
1 parent 515a887 commit 2788d9f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/bin/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ impl InMemoryKeyManagerConfig for Keys {
}
}

#[derive(Deserialize)]
struct PublicResponse {
n: String,
}

#[async_trait::async_trait]
pub trait IntoAsync<T> {
async fn into_async(&self) -> T;
Expand All @@ -122,9 +117,9 @@ impl IntoAsync<AppContext> for CliOpts {
.await
.expect("Couldn't parse public key response from bundler");

let public_response = serde_json::from_str::<PublicResponse>(&n_response).unwrap();
let public_response = serde_json::from_str::<String>(&n_response).unwrap();
let bundler_jwk =
public_only_jwk_from_rsa_n(&public_response.n).expect("Failed to decode bundler key");
public_only_jwk_from_rsa_n(&public_response).expect("Failed to decode bundler key");
let validator_jwk: JsonWebKey = {
let file = fs::read_to_string(&self.validator_key).unwrap();
file.parse().unwrap()
Expand Down

0 comments on commit 2788d9f

Please sign in to comment.