Skip to content

Commit

Permalink
chore: update interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Apr 13, 2021
1 parent dd8f462 commit 22a63ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"denque": "^1.4.1",
"err-code": "^2.0.0",
"it-pipe": "^1.0.1",
"libp2p-interfaces": "libp2p/js-libp2p-interfaces#chore/update-pubsub-interface",
"libp2p-interfaces": "^0.10.0",
"peer-id": "^0.14.0",
"protobufjs": "^6.10.2",
"time-cache": "^0.3.0",
Expand All @@ -68,13 +68,13 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"it-pair": "^1.0.0",
"libp2p": "^0.30.0",
"libp2p-floodsub": "^0.24.1",
"libp2p": "libp2p/js-libp2p#chore/config-ts",
"libp2p-floodsub": "^0.25.0",
"libp2p-mplex": "^0.10.0",
"libp2p-noise": "^2.0.0",
"libp2p-websockets": "^0.15.4",
"libp2p-websockets": "^0.15.5",
"lodash": "^4.17.15",
"multiaddr": "^8.0.0",
"multiaddr": "^9.0.0",
"os": "^0.1.1",
"p-retry": "^4.2.0",
"p-times": "^2.1.0",
Expand Down
6 changes: 3 additions & 3 deletions test/utils/create-peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

const Libp2p = require('libp2p')
const multiaddr = require('multiaddr')
const { Multiaddr } = require('multiaddr')
const PeerId = require('peer-id')

const WS = require('libp2p-websockets')
Expand Down Expand Up @@ -56,10 +56,10 @@ function isBrowser() {
function getListenAddress (peerId) {
if (isBrowser()) {
// browser
return multiaddr(`${RelayPeer.multiaddr}/p2p-circuit/p2p/${peerId.toB58String()}`)
return new Multiaddr(`${RelayPeer.multiaddr}/p2p-circuit/p2p/${peerId.toB58String()}`)
} else {
// node
return multiaddr('/ip4/127.0.0.1/tcp/0/ws')
return new Multiaddr('/ip4/127.0.0.1/tcp/0/ws')
}
}

Expand Down
2 changes: 1 addition & 1 deletion ts/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InMessage } from 'libp2p-interfaces/src/pubsub'
import PeerId = require('peer-id')
import Multiaddr = require('multiaddr')
import { Multiaddr } from 'multiaddr'

export interface AddrInfo {
id: PeerId
Expand Down

0 comments on commit 22a63ef

Please sign in to comment.