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,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 = '';