From 15ed2a04bc0c83c6fa190f1406aca03e0ef5ec6c Mon Sep 17 00:00:00 2001 From: Vecna Date: Fri, 29 Mar 2024 16:11:44 -0400 Subject: [PATCH] Handle error if user tries to create invalid lox_proof in PR --- src/positive_report.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/positive_report.rs b/src/positive_report.rs index 63302d9..12901eb 100644 --- a/src/positive_report.rs +++ b/src/positive_report.rs @@ -71,9 +71,9 @@ impl PositiveReport { lox_cred: &Lox, lox_pub: &IssuerPubKey, country: String, - ) -> Self { - let lox_proof = lox_pr::request(lox_cred, lox_pub).unwrap(); - PositiveReport::new(bridge_id, bridge_token, lox_proof, country) + ) -> Result { + let lox_proof = lox_pr::request(lox_cred, lox_pub)?; + Ok(PositiveReport::new(bridge_id, bridge_token, lox_proof, country)) } /// Convert report to a serializable version