diff --git a/README.md b/README.md index 305656dbd8..48475ea206 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ - [Install](#install) - [Usage](#usage) - [License](#license) -- [Contribution](#contribution) +- [Contribute](#contribute) ## Install @@ -42,6 +42,6 @@ Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribution +## Contribute Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. diff --git a/package.json b/package.json index 56a6ad8572..628417a89b 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ "@libp2p/peer-collections": "^2.0.0", "@libp2p/peer-id": "^1.1.0", "@libp2p/topology": "^3.0.0", - "@multiformats/multiaddr": "^10.2.0", + "@multiformats/multiaddr": "^11.0.0", "abortable-iterator": "^4.0.2", "err-code": "^3.0.1", "it-length-prefixed": "^8.0.2", diff --git a/src/index.ts b/src/index.ts index 3c825f45fd..c11ba06332 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,7 +27,7 @@ export interface TopicValidator { (topic: string, message: Message): Promise extends EventEmitter implements PubSub, Initializable { +export abstract class PubSubBaseProtocol extends EventEmitter implements PubSub, Initializable { public started: boolean /** * Map of topics to which peers are subscribed to @@ -694,7 +694,6 @@ export abstract class PubSubBaseProtocol extends EventEmi throw new Error('Pubsub is not started') } - // @ts-expect-error topic should be a key of the event map super.removeEventListener(topic) const wasSubscribed = this.subscriptions.has(topic)