Successfully save events in indexDB.

This commit is contained in:
Ryan Breen
2023-02-12 00:25:57 -05:00
parent 8b2931e1fc
commit 90f6134bc4
5 changed files with 46 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ import {
setPermission,
feature,
} from './utils';
import { saveEvent } from './db';
const storage = browser.storage.local;
const log = msg => console.log('Background: ', msg);
@@ -220,7 +221,7 @@ async function signEvent_(event) {
event.pubkey = pubKey;
event.id = getEventHash(event);
event.sig = signEvent(event, privKey);
console.log(JSON.stringify(event));
saveEvent(event);
return event;
}