Skip to content

Commit

Permalink
fix: use dht selectors and validators from interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Apr 21, 2021
1 parent 69dbd29 commit 5a20167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"it-pair": "^1.0.0",
"libp2p": "^0.30.9",
"libp2p-gossipsub": "^0.8.0",
"libp2p-interfaces": "^0.8.3",
"libp2p-interfaces": "libp2p/js-libp2p-interfaces#chore/add-dht-selectors-validators",
"libp2p-record": "^0.10.0",
"p-wait-for": "^3.1.0",
"peer-id": "^0.14.2",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const log = Object.assign(debug('datastore-pubsub:publisher'), {
* @typedef {import('peer-id')} PeerId
* @typedef {import('./types').Validator} Validator
* @typedef {import('./types').SubscriptionKeyFn} SubscriptionKeyFn
* @typedef {import('libp2p-interfaces/src/pubsub/message').Message} PubSubMessage
* @typedef {import('libp2p-interfaces/src/pubsub').InMessage} PubSubMessage
*/

// DatastorePubsub is responsible for providing an api for pubsub to be used as a datastore with
Expand Down Expand Up @@ -182,6 +182,7 @@ class DatastorePubsub extends Adapter {
*/
async _onMessage (msg) {
const { data, from, topicIDs } = msg

let key
try {
key = topicToKey(topicIDs[0])
Expand Down

0 comments on commit 5a20167

Please sign in to comment.