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

refactor: return peer ids as strings #1226

Merged
merged 8 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
refactor: return peer ids as strings
  • Loading branch information
achingbrain committed Jan 24, 2020
commit c4cf441dbe5afa7688a5bb47528961dec363d742
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"async": "^3.1.0",
"browser-process-platform": "~0.1.1",
"go-ipfs-dep": "^0.4.22",
"interface-ipfs-core": "^0.129.0",
"interface-ipfs-core": "ipfs/interface-js-ipfs-core#return-peer-ids-as-strings",
"ipfsd-ctl": "^1.0.2",
"it-all": "^1.0.1",
"it-concat": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions src/swarm/peers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

const multiaddr = require('multiaddr')
const CID = require('cids')
const configure = require('../lib/configure')

module.exports = configure(({ ky }) => {
Expand All @@ -25,7 +24,7 @@ module.exports = configure(({ ky }) => {
const info = {}
try {
info.addr = multiaddr(peer.Addr)
info.peer = new CID(peer.Peer)
info.peer = peer.Peer
} catch (error) {
info.error = error
info.rawPeerInfo = peer
Expand Down