a thousand fixes and now signEvent and getPublic are fully working.

This commit is contained in:
fiatjaf
2022-01-10 21:18:55 -03:00
parent 233aaa0f8f
commit 0d38bc7eb3
7 changed files with 66 additions and 34 deletions

View File

@@ -5,9 +5,15 @@ import browser from 'webextension-polyfill'
document
.getElementById('privateKeyInput')
.addEventListener('input', async ev => {
let key = document
.getElementById('privateKeyInput')
.value.toLowerCase()
.trim()
if (!key.match(/^[a-f0-9]{64}$/)) return
try {
await browser.storage.local.set({
private_key: document.getElementById('privateKeyInput').value
private_key: key
})
showMessage('saved!')
} catch (err) {