invitation code last 1 day

Niko PLP 1 year ago
parent 342168a90b
commit 522b46015b
  1. 2
      ng-app/src/routes/WalletCreate.svelte
  2. 2
      ngaccount/src/main.rs
  3. 7
      p2p-net/src/utils.rs

@ -84,7 +84,7 @@
} }
}; };
let intro = false; let intro = true;
let registration_error; let registration_error;
let registration_success; let registration_success;
let pin = []; let pin = [];

@ -61,7 +61,7 @@ impl Server {
// if needed, proceed with payment and verify it here. once validated, add the user // if needed, proceed with payment and verify it here. once validated, add the user
let duration = parse("5m").unwrap(); let duration = parse("1d").unwrap();
let expiry = timestamp_after(duration); let expiry = timestamp_after(duration);
let symkey = SymKey::random(); let symkey = SymKey::random();
let invite_code = InvitationCode::Unique(symkey.clone()); let invite_code = InvitationCode::Unique(symkey.clone());

@ -154,10 +154,13 @@ pub async fn retrieve_local_bootstrap(
if resp.is_ok() { if resp.is_ok() {
let mut inv: Invitation = resp.unwrap().into(); let mut inv: Invitation = resp.unwrap().into();
inv.set_url(BROKER.read().await.get_registration_url()); inv.set_url(BROKER.read().await.get_registration_url());
return Some(inv); Some(inv)
} } else {
None
} }
} else {
None None
}
}; };
let res = if invite1.is_none() { let res = if invite1.is_none() {

Loading…
Cancel
Save