fix: save key and load key

This commit is contained in:
Ren Amamiya
2026-04-08 13:16:36 +07:00
parent 4050afe93f
commit 3dd032e238
6 changed files with 257 additions and 247 deletions

View File

@@ -31412,6 +31412,10 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
var Trigger = TabsTrigger;
var Content = TabsContent;
// node_modules/.pnpm/nostr-tools@2.23.3/node_modules/nostr-tools/lib/esm/utils.js
var utf8Decoder2 = new TextDecoder("utf-8");
var utf8Encoder2 = new TextEncoder();
// extension/popup.jsx
var import_jsx_runtime = __toESM(require_jsx_runtime());
function Popup() {
@@ -31428,9 +31432,9 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
(0, import_react3.useEffect)(() => {
import_webextension_polyfill.default.storage.local.get(["private_key", "relays"]).then((results) => {
if (results.private_key) {
const hexKey = getPublicKey(results.private_key);
const npubKey = nip19_exports.npubEncode(hexKey);
setKeys({ npub: npubKey, hex: hexKey });
const hexKey = getPublicKey(hexToBytes(results.private_key));
const npub = nip19_exports.npubEncode(hexKey);
setKeys({ npub, hex: hexKey });
if (results.relays) {
const relaysList = [];
for (const url in results.relays) {