nip07: catch signEvent error

This commit is contained in:
Alex Gleason 2023-05-13 21:25:59 -05:00
parent 85f526d1d4
commit e5837ebefb
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -183,7 +183,7 @@ const connectTimelineStream = (
break;
case 'nostr.sign':
(async () => {
const event = await window.nostr?.signEvent(JSON.parse(data.payload));
const event = await window.nostr?.signEvent(JSON.parse(data.payload)).catch(() => undefined);
if (event) {
websocket.send(JSON.stringify({ event: 'nostr.sign', payload: JSON.stringify(event) }));