Skip to content

Commit

Permalink
simplify serialization and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsnewnami committed Dec 4, 2024
1 parent e008702 commit 691b7a4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions bolt-cli/src/common/web3signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ impl Web3Signer {
/// The two below proxy fields are here for deserialisation purposes.
/// They are not used as signing is only over the consensus type.
#[allow(unused)]
_proxy_bls: Vec<String>,
proxy_bls: Vec<String>,
#[allow(unused)]
_proxy_ecdsa: Vec<String>,
proxy_ecdsa: Vec<String>,
}

/// Outer container for response.
Expand Down Expand Up @@ -92,14 +92,9 @@ impl Web3Signer {
.json(&map)
.send()
.await?
.text()
.json::<String>()
.await?;

let resp = resp
.strip_prefix('"')
.and_then(|s| s.strip_suffix('"'))
.wrap_err("Recieved malformed response from web3signer")?;

Ok(resp.to_string())
}
}
Expand Down

0 comments on commit 691b7a4

Please sign in to comment.