mirror of
https://github.com/nostr-connect/connect.git
synced 2025-12-17 13:14:20 +01:00
update to new Event from nostr-tools
This commit is contained in:
@@ -71,7 +71,9 @@ const App = () => {
|
|||||||
pubkey: pubkey,
|
pubkey: pubkey,
|
||||||
created_at: Math.floor(Date.now() / 1000),
|
created_at: Math.floor(Date.now() / 1000),
|
||||||
tags: [],
|
tags: [],
|
||||||
content: "Running Nostr Connect 🔌"
|
content: "Running Nostr Connect 🔌",
|
||||||
|
id: '',
|
||||||
|
sig: '',
|
||||||
};
|
};
|
||||||
event.id = getEventHash(event)
|
event.id = getEventHash(event)
|
||||||
event.sig = await connect.signEvent(event);
|
event.sig = await connect.signEvent(event);
|
||||||
|
|||||||
@@ -228,6 +228,8 @@ export async function prepareEvent(
|
|||||||
pubkey: getPublicKey(secretKey),
|
pubkey: getPublicKey(secretKey),
|
||||||
tags: [['p', pubkey]],
|
tags: [['p', pubkey]],
|
||||||
content: cipherText,
|
content: cipherText,
|
||||||
|
id: '',
|
||||||
|
sig: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
const id = getEventHash(event);
|
const id = getEventHash(event);
|
||||||
@@ -299,7 +301,7 @@ export async function broadcastToRelay(
|
|||||||
pub.on('failed', (reason: any) => {
|
pub.on('failed', (reason: any) => {
|
||||||
reject(reason);
|
reject(reason);
|
||||||
});
|
});
|
||||||
pub.on('seen', () => {
|
pub.on('ok', () => {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user