diff --git a/src/web_ui.rs b/src/web_ui.rs index 41c74fb..fe4ecc2 100644 --- a/src/web_ui.rs +++ b/src/web_ui.rs @@ -166,7 +166,7 @@ fn action_load_key(context: &Arc>, web_view: &mut WebView<()>) { event_fail(web_view, &format!("Error loading key from \\'{}\\'!", &file_name)); } Some(keystore) => { - info!("Loaded keystore with key: {:?}", &keystore); + info!("Loaded keystore with keys: {:?}, {:?}", &keystore.get_public(), &keystore.get_encryption_public()); let mut c = context.lock().unwrap(); let path = keystore.get_path().to_owned(); let public = keystore.get_public().to_string(); @@ -389,15 +389,10 @@ fn action_create_domain(context: Arc>, miner: Arc>, } } } - let signing = if !signing.is_empty() { - Bytes::new(from_hex(&signing).unwrap()) + let (signing, encryption) = if signing.is_empty() || encryption.is_empty() { + (keystore.get_public(), keystore.get_encryption_public()) } else { - Bytes::default() - }; - let encryption = if !encryption.is_empty() { - Bytes::new(from_hex(&encryption).unwrap()) - } else { - Bytes::default() + (Bytes::new(from_hex(&signing).unwrap()), Bytes::new(from_hex(&encryption).unwrap())) }; match context.chain.can_mine_domain(context.chain.get_height(), &name, &pub_key) { MineResult::Fine => { diff --git a/src/webview/index.html b/src/webview/index.html index e583aaf..69e2fab 100644 --- a/src/webview/index.html +++ b/src/webview/index.html @@ -265,7 +265,7 @@ Just list your contacts, separated by new line.

- +
@@ -284,7 +284,7 @@

You can add some description to your domain if you wish for users or search engines to know what is it about.

- +
diff --git a/src/webview/scripts.js b/src/webview/scripts.js index c276792..8860bf9 100644 --- a/src/webview/scripts.js +++ b/src/webview/scripts.js @@ -248,8 +248,8 @@ function createDomain() { function getContacts() { var result = []; var text = document.getElementById("contacts_text").value; - if (value != "") { - var lines = value.split("\n"); + if (text != "") { + var lines = text.split("\n"); lines.forEach(function(value, index, array) { result.push(value); });