Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 09b02e2

Browse files
committed
fix: peer should hold PeerId and not PeerInfo
1 parent 8bddf25 commit 09b02e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/components/swarm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const multiaddr = require('multiaddr')
44
const promisify = require('promisify-es6')
55
const values = require('lodash.values')
6+
const PeerId = require('peer-id')
67

78
const OFFLINE_ERROR = require('../utils').OFFLINE_ERROR
89

@@ -31,7 +32,7 @@ module.exports = function swarm (self) {
3132

3233
const tupple = {
3334
addr: connectedAddr,
34-
peer: peer
35+
peer: peer.id
3536
}
3637
if (verbose) {
3738
tupple.latency = 'unknown'

0 commit comments

Comments
 (0)