update to new Event from nostr-tools

This commit is contained in:
tiero
2023-02-22 19:00:22 +01:00
parent 39b300d40b
commit a361431dce
2 changed files with 6 additions and 2 deletions

View File

@@ -71,7 +71,9 @@ const App = () => {
pubkey: pubkey,
created_at: Math.floor(Date.now() / 1000),
tags: [],
content: "Running Nostr Connect 🔌"
content: "Running Nostr Connect 🔌",
id: '',
sig: '',
};
event.id = getEventHash(event)
event.sig = await connect.signEvent(event);

View File

@@ -228,6 +228,8 @@ export async function prepareEvent(
pubkey: getPublicKey(secretKey),
tags: [['p', pubkey]],
content: cipherText,
id: '',
sig: '',
};
const id = getEventHash(event);
@@ -299,7 +301,7 @@ export async function broadcastToRelay(
pub.on('failed', (reason: any) => {
reject(reason);
});
pub.on('seen', () => {
pub.on('ok', () => {
resolve();
});
});