Merge pull request #8 from sairaj-mote/master

added wrong private key error notification
This commit is contained in:
sairaj mote 2020-08-25 20:53:36 +05:30 committed by GitHub
commit 14221b3a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -781,11 +781,16 @@
let keyInput = signInBox.getElementsByTagName('input')[0]; let keyInput = signInBox.getElementsByTagName('input')[0];
let key = keyInput.value; let key = keyInput.value;
keyInput.value = ''; keyInput.value = '';
if(floCrypto.getPubKeyHex(keyInput)){
buttons[0].onclick = null; buttons[0].onclick = null;
buttons[1].onclick = null; buttons[1].onclick = null;
signInBox.classList.add('hide') signInBox.classList.add('hide')
resolve(key) resolve(key)
} }
else{
showMessage('Incorrect Private Key! Please Enter correct key again', 'error')
}
}
buttons[1].onclick = () => { buttons[1].onclick = () => {
signInBox.getElementsByTagName('input')[0].value = ''; signInBox.getElementsByTagName('input')[0].value = '';
buttons[0].onclick = null; buttons[0].onclick = null;