diff --git a/src/main.js b/src/main.js index 273f3e4..488935d 100644 --- a/src/main.js +++ b/src/main.js @@ -579,6 +579,13 @@ importBtn.addEventListener('click', () => { }); settingsForm.addEventListener('input', () => validKeys(privateKeyInput.value, pubKeyInput.value)); +privateKeyInput.addEventListener('paste', (event) => { + if (!pubKeyInput.value && event.clipboardData) { + try { + pubKeyInput.value = getPublicKey(event.clipboardData.getData('text')); + } catch(err) {} // ignore as the error will be shown by validKeys later on input + } +}); function validKeys(privatekey, pubkey) { try {