From 522b46015b74327c4028f8e404875d920740c7e5 Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Sat, 15 Jul 2023 00:16:54 +0300 Subject: [PATCH] invitation code last 1 day --- ng-app/src/routes/WalletCreate.svelte | 2 +- ngaccount/src/main.rs | 2 +- p2p-net/src/utils.rs | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ng-app/src/routes/WalletCreate.svelte b/ng-app/src/routes/WalletCreate.svelte index a2c51c7..0a2e9eb 100644 --- a/ng-app/src/routes/WalletCreate.svelte +++ b/ng-app/src/routes/WalletCreate.svelte @@ -84,7 +84,7 @@ } }; - let intro = false; + let intro = true; let registration_error; let registration_success; let pin = []; diff --git a/ngaccount/src/main.rs b/ngaccount/src/main.rs index 2a8d935..d1f7050 100644 --- a/ngaccount/src/main.rs +++ b/ngaccount/src/main.rs @@ -61,7 +61,7 @@ impl Server { // 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 symkey = SymKey::random(); let invite_code = InvitationCode::Unique(symkey.clone()); diff --git a/p2p-net/src/utils.rs b/p2p-net/src/utils.rs index 0575b6d..8742a65 100644 --- a/p2p-net/src/utils.rs +++ b/p2p-net/src/utils.rs @@ -154,10 +154,13 @@ pub async fn retrieve_local_bootstrap( if resp.is_ok() { let mut inv: Invitation = resp.unwrap().into(); 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() {