Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

deps: update @multiformats/multiaddr to 11.0.0 #101

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Install](#install)
- [Usage](#usage)
- [License](#license)
- [Contribution](#contribution)
- [Contribute](#contribute)

## Install

Expand Down Expand Up @@ -42,6 +42,6 @@ Licensed under either of
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/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.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface TopicValidator { (topic: string, message: Message): Promise<voi
* PubSubBaseProtocol handles the peers and connections logic for pubsub routers
* and specifies the API that pubsub routers should have.
*/
export abstract class PubSubBaseProtocol<Events = PubSubEvents> extends EventEmitter<Events> implements PubSub<Events>, Initializable {
export abstract class PubSubBaseProtocol<Events extends { [s: string]: any } = PubSubEvents> extends EventEmitter<Events> implements PubSub<Events>, Initializable {
public started: boolean
/**
* Map of topics to which peers are subscribed to
Expand Down Expand Up @@ -694,7 +694,6 @@ export abstract class PubSubBaseProtocol<Events = PubSubEvents> 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)
Expand Down