From f6fb67d1b8dcec0bfe3ecb8d2f7f9af9accbb7d9 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Tue, 25 Aug 2020 20:52:43 +0530 Subject: [PATCH] added wrong private key error notification --- index.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 90398e3..ca764f8 100644 --- a/index.html +++ b/index.html @@ -781,10 +781,15 @@ let keyInput = signInBox.getElementsByTagName('input')[0]; let key = keyInput.value; keyInput.value = ''; - buttons[0].onclick = null; - buttons[1].onclick = null; - signInBox.classList.add('hide') - resolve(key) + if(floCrypto.getPubKeyHex(keyInput)){ + buttons[0].onclick = null; + buttons[1].onclick = null; + signInBox.classList.add('hide') + resolve(key) + } + else{ + showMessage('Incorrect Private Key! Please Enter correct key again', 'error') + } } buttons[1].onclick = () => { signInBox.getElementsByTagName('input')[0].value = '';