Log relay error, remove unnecessary DVM conditional
This commit is contained in:
parent
940fc7a305
commit
29a63f262f
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue