From e05c03bc57c2a324ec9c99e5bbab9d0dd0f04824 Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Fri, 8 Sep 2023 00:54:38 +0300 Subject: [PATCH] added accept cookie on web version of BSP registration page --- ngaccount/web/src/routes/Create.svelte | 28 ++++++++++++++++++++++++++ p2p-net/src/utils.rs | 9 +++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/ngaccount/web/src/routes/Create.svelte b/ngaccount/web/src/routes/Create.svelte index 5a870d5..439e4dd 100644 --- a/ngaccount/web/src/routes/Create.svelte +++ b/ngaccount/web/src/routes/Create.svelte @@ -339,6 +339,34 @@ > + {#if !window.__TAURI__} +
  • + + + By agreeing to those terms, you allow this software to store + some personal data locally in localStorage, the equivalent of + a cookie. This cookie contains your wallet and is never sent + to us. If you delete this cookie without keeping a copy of + your wallet somewhere else, then you will permanently loose + your wallet. + +
  • + {/if} diff --git a/p2p-net/src/utils.rs b/p2p-net/src/utils.rs index 1d4c055..70b6c98 100644 --- a/p2p-net/src/utils.rs +++ b/p2p-net/src/utils.rs @@ -123,11 +123,16 @@ async fn retrieve_ng_bootstrap(location: &String) -> Option APP_PREFIX.to_string() }; let url = format!("{}{}", prefix, NG_BOOTSTRAP_LOCAL_PATH); - //log_info!("url {}", url); + log_info!("url {}", url); let resp = reqwest::get(url).await; + //log_info!("{:?}", resp); if resp.is_ok() { let resp = resp.unwrap().json::().await; - return Some(resp.unwrap()); + return if resp.is_ok() { + Some(resp.unwrap()) + } else { + None + }; } else { //log_info!("err {}", resp.unwrap_err()); return None;