Handle error if user tries to create invalid lox_proof in PR
This commit is contained in:
parent
4390716ebf
commit
15ed2a04bc
|
@ -71,9 +71,9 @@ impl PositiveReport {
|
||||||
lox_cred: &Lox,
|
lox_cred: &Lox,
|
||||||
lox_pub: &IssuerPubKey,
|
lox_pub: &IssuerPubKey,
|
||||||
country: String,
|
country: String,
|
||||||
) -> Self {
|
) -> Result<Self, lox_library::proto::positive_report::requestproof::ProofError> {
|
||||||
let lox_proof = lox_pr::request(lox_cred, lox_pub).unwrap();
|
let lox_proof = lox_pr::request(lox_cred, lox_pub)?;
|
||||||
PositiveReport::new(bridge_id, bridge_token, lox_proof, country)
|
Ok(PositiveReport::new(bridge_id, bridge_token, lox_proof, country))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert report to a serializable version
|
/// Convert report to a serializable version
|
||||||
|
|
Loading…
Reference in New Issue