Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Aug 24, 2023
1 parent bf437bc commit 4180d9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion enclave-runtime/src/rpc/encointer_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ fn get_reputation_ocall_api(
cid: CommunityIdentifier,
cindex: CeremonyIndexType,
) -> Reputation {
println!("requesting reputation for {:?}: cid is :{}, cindex is: {}", prover, cid, cindex.clone());
println!(
"requesting reputation for {:?}: cid is :{}, cindex is: {}",
prover,
cid,
cindex.clone()
);
let unverified_reputation = Reputation::Unverified;

let ocall_api = GLOBAL_OCALL_API_COMPONENT.get();
Expand Down
7 changes: 4 additions & 3 deletions enclave-runtime/src/rpc/worker_api_direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ fn issue_nostr_badge_inner(params: Params) -> Result<nostr::EventId, String> {
Decode::decode(&mut nostr_relay_url.as_slice()).map_err(|e| format!("{:?}", e))?;

// todo: derive from enclave signing key
let nostr_issuers_private_key = "nsec1punh8ys9ewzjhuuzh6dtna2d72l8d2pc2cyuuh93g9h73uedg5nq9z4p7l".to_string();
let nostr_issuers_private_key =
"nsec1punh8ys9ewzjhuuzh6dtna2d72l8d2pc2cyuuh93g9h73uedg5nq9z4p7l".to_string();

let secp = Secp256k1::new();
let signer_key =
Expand Down Expand Up @@ -462,7 +463,8 @@ fn create_nostr_badge_award(

fn create_nostr_badge_definition(signer_key: &Keys, reputation: u32) -> BadgeDefinition {
// Just for demo purposes, should be reworked
let builder = nip58::BadgeDefinitionBuilder::new(format!("personhood_{}", reputation).to_owned());
let builder =
nip58::BadgeDefinitionBuilder::new(format!("personhood_{}", reputation).to_owned());
let builder = builder
.name(format!("Personhood Confidence {}/5 Verified by Encointer (TESTING)", reputation))
.description(format!("This badge is only issued once every 10 days for reputables on the Encointer network who have attended proof of personhood cycles (see https://encointer.org). \
Expand Down Expand Up @@ -495,7 +497,6 @@ fn create_nostr_badge_definition(signer_key: &Keys, reputation: u32) -> BadgeDef
),
]);


let secp = Secp256k1::new();
let ts = get_ts();

Expand Down

0 comments on commit 4180d9c

Please sign in to comment.