flamingo
flamingo copied to clipboard
In the `signEvent` method, the `pubkey` of the `event` should be optional?
I'm signing this event:
window.nostr.signEvent({
kind: 1,
created_at: Math.floor(Date.now() / 1000),
tags: [],
content: 'hello world'
}).then(console.log).catch(console.error)
Flamingo doesn't popup, but Alby does.
After I've added pubkey to the event object:
window.nostr.signEvent({
kind: 1,
created_at: Math.floor(Date.now() / 1000),
pubkey: 'xxx',
tags: [],
content: 'hello world'
}).then(console.log).catch(console.error)
Flamingo does popup.
However, according to the NIPS-07:
async window.nostr.signEvent(event: Event): Event // takes an event object, adds `id`, `pubkey` and `sig` and returns it
pubkey is added after calling the signEvent mothod. So I think the pubkey should be optional to the event object passing to the signEvent method.