Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 820150c

Browse files
authored
feat: new peer-info (#542)
* feat: new peer-info
1 parent 17636a9 commit 820150c

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"coverage-publish": "aegir-coverage publish"
2323
},
2424
"dependencies": {
25-
"async": "^2.1.5",
25+
"async": "^2.2.0",
2626
"bs58": "^4.0.0",
2727
"cids": "~0.4.2",
2828
"concat-stream": "^1.6.0",
@@ -36,13 +36,13 @@
3636
"is-ipfs": "~0.3.0",
3737
"isstream": "^0.1.2",
3838
"lru-cache": "^4.0.2",
39-
"multiaddr": "^2.2.2",
40-
"multihashes": "~0.4.4",
39+
"multiaddr": "^2.3.0",
40+
"multihashes": "~0.4.5",
4141
"multipart-stream": "^2.0.1",
4242
"ndjson": "^1.5.0",
4343
"once": "^1.4.0",
44-
"peer-id": "~0.8.4",
45-
"peer-info": "~0.8.4",
44+
"peer-id": "~0.8.6",
45+
"peer-info": "~0.9.0",
4646
"promisify-es6": "^1.0.2",
4747
"pump": "^1.0.2",
4848
"qs": "^6.4.0",
@@ -66,7 +66,7 @@
6666
"eslint-plugin-react": "^6.10.3",
6767
"gulp": "^3.9.1",
6868
"hapi": "^16.1.0",
69-
"interface-ipfs-core": "~0.26.0",
69+
"interface-ipfs-core": "~0.26.1",
7070
"ipfsd-ctl": "~0.20.0",
7171
"pre-commit": "^1.2.2",
7272
"socket.io": "^1.7.3",
@@ -127,4 +127,4 @@
127127
"url": "https://github.com/ipfs/js-ipfs-api/issues"
128128
},
129129
"homepage": "https://github.com/ipfs/js-ipfs-api"
130-
}
130+
}

src/api/swarm.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,11 @@ module.exports = (send) => {
100100
}
101101

102102
const peers = Object.keys(result.Addrs).map((id) => {
103-
const info = new PeerInfo(PeerId.createFromB58String(id))
103+
const peerInfo = new PeerInfo(PeerId.createFromB58String(id))
104104
result.Addrs[id].forEach((addr) => {
105-
info.multiaddr.add(multiaddr(addr))
105+
peerInfo.multiaddrs.add(multiaddr(addr))
106106
})
107-
108-
return info
107+
return peerInfo
109108
})
110109

111110
callback(null, peers)

0 commit comments

Comments
 (0)