Skip to content

Commit

Permalink
Panic if we didn't get any successful registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
HCastano committed Aug 14, 2024
1 parent fd4a600 commit 139c893
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/test-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ pub async fn run_command(

// The CLI currently doesn't support sending multiple registration requests in a single
// go, so we just grab one event (presumably the only one) and log that.
let (verifying_key, registered_info) = dbg!(&registrations)
.get(0)
.expect("There should be at least one succeful registration at this point.");
if registrations.is_empty() {
panic!("Failed to register an account!")
}

let (verifying_key, registered_info) = &registrations[0];

Ok(format!("Verifying key: {},\n{:?}", hex::encode(verifying_key), registered_info))
},
Expand Down

0 comments on commit 139c893

Please sign in to comment.