Log relay error, remove unnecessary DVM conditional

This commit is contained in:
Alex Gleason 2024-03-26 21:10:59 -05:00
parent 940fc7a305
commit 29a63f262f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 1 additions and 5 deletions

View File

@ -85,6 +85,7 @@ function connectStream(socket: WebSocket) {
send(['OK', event.id, false, e.message]); send(['OK', event.id, false, e.message]);
} else { } else {
send(['OK', event.id, false, 'error: something went wrong']); send(['OK', event.id, false, 'error: something went wrong']);
console.error(e);
} }
} }
} }

View File

@ -20,11 +20,6 @@ export class DVM {
static async nameRegistration(event: NostrEvent): Promise<void> { static async nameRegistration(event: NostrEvent): Promise<void> {
const admin = await new AdminSigner().getPublicKey(); const admin = await new AdminSigner().getPublicKey();
if (event.kind !== 5950 && event.pubkey !== admin) {
throw new Error('Only NIP-05 job requests are permitted');
}
const input = event.tags.find(([name]) => name === 'i')?.[1]; const input = event.tags.find(([name]) => name === 'i')?.[1];
const tagged = !!event.tags.find(([name, value]) => name === 'p' && value === admin); const tagged = !!event.tags.find(([name, value]) => name === 'p' && value === admin);