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 keyInput = signInBox.getElementsByTagName('input')[0];
let key = keyInput.value; let key = keyInput.value;
keyInput.value = ''; keyInput.value = '';
buttons[0].onclick = null; if(floCrypto.getPubKeyHex(keyInput)){
buttons[1].onclick = null; buttons[0].onclick = null;
signInBox.classList.add('hide') buttons[1].onclick = null;
resolve(key) signInBox.classList.add('hide')
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 = '';