refactor: listen only needs to return the done handler

This commit is contained in:
Derrick Hammer 2023-09-01 08:24:55 -04:00
parent 427c423b2c
commit 1b04799943
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ export class RegistryService {
public listen(
pk: Uint8Array,
cb: (sre: SignedRegistryEntry) => void,
): ((() => void) | EventEmitter)[] {
): () => void {
const key = new Multihash(pk).toString();
if (!this.streams[key]) {
this.streams[key] = new EventEmitter();
@ -226,7 +226,7 @@ export class RegistryService {
stream.on("event", cb);
return [done, stream];
return done;
}
public deserializeRegistryEntry(event: Uint8Array): SignedRegistryEntry {