From 223fe2ff48ef80ef8b7773694685ae5036721da0 Mon Sep 17 00:00:00 2001 From: xevisalle <38231508+xevisalle@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:39:36 +0100 Subject: [PATCH] remove unnecessary parsing --- moat-example/src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/moat-example/src/main.rs b/moat-example/src/main.rs index 53a24a8..5c3e181 100644 --- a/moat-example/src/main.rs +++ b/moat-example/src/main.rs @@ -51,9 +51,7 @@ async fn main() -> Result<(), Error> { let requests = MoatCore::get_owned_requests(&ssk_lp, &moat_context).await?; // Issue a license - let attr_data = JubJubScalar::from( - "1234".parse::().expect("attribute date is correct"), - ); + let attr_data = JubJubScalar::from(1234u64); let rng = &mut OsRng; let license_hash = MoatCore::issue_license( requests.get(0).expect("A request was owned."), @@ -71,9 +69,7 @@ async fn main() -> Result<(), Error> { // Use a license let psk_sp = psk_lp; // we set the same one than the LP just for testing - let challenge = JubJubScalar::from( - "1234".parse::().expect("challenge value is correct"), - ); + let challenge = JubJubScalar::from(1234u64); let session_cookie = MoatCore::use_license( &moat_context, &psk_lp,