|
|
@ -541,7 +541,6 @@ importBtn.addEventListener('click', () => {
|
|
|
|
settingsForm.addEventListener('input', () => validKeys(privateKeyInput.value, pubKeyInput.value));
|
|
|
|
settingsForm.addEventListener('input', () => validKeys(privateKeyInput.value, pubKeyInput.value));
|
|
|
|
|
|
|
|
|
|
|
|
function validKeys(privatekey, pubkey) {
|
|
|
|
function validKeys(privatekey, pubkey) {
|
|
|
|
if (pubkey && privatekey) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (getPublicKey(privatekey) === pubkey) {
|
|
|
|
if (getPublicKey(privatekey) === pubkey) {
|
|
|
|
statusMessage.hidden = true;
|
|
|
|
statusMessage.hidden = true;
|
|
|
@ -554,7 +553,6 @@ function validKeys(privatekey, pubkey) {
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
statusMessage.textContent = `not a valid private-key: ${e.message || e}`;
|
|
|
|
statusMessage.textContent = `not a valid private-key: ${e.message || e}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
statusMessage.hidden = false;
|
|
|
|
statusMessage.hidden = false;
|
|
|
|
importBtn.setAttribute('disabled', true);
|
|
|
|
importBtn.setAttribute('disabled', true);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|