mirror of
https://github.com/nostr-connect/connect.git
synced 2025-12-17 05:04:20 +01:00
update to new Event from nostr-tools
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user