diff --git a/example/index.tsx b/example/index.tsx index 034fa8e..1584e35 100644 --- a/example/index.tsx +++ b/example/index.tsx @@ -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); diff --git a/src/rpc.ts b/src/rpc.ts index 648cd6e..faf57c5 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -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(); }); });