update nostr-tools and remove Buffer calls.

This commit is contained in:
fiatjaf
2022-02-15 19:54:36 -03:00
parent 259a37d4d7
commit 56cb50950f
4 changed files with 16 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
import browser from 'webextension-polyfill'
import {Buffer} from 'buffer'
import {render} from 'react-dom'
import {getPublicKey} from 'nostr-tools'
import React, {useState, useEffect} from 'react'
@@ -10,7 +9,7 @@ function Popup() {
useEffect(() => {
browser.storage.local.get('private_key').then(results => {
if (results.private_key) {
setKey(Buffer.from(getPublicKey(results.private_key)).toString('hex'))
setKey(getPublicKey(results.private_key))
} else {
setKey(null)
}