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

Commit ec1ad3f

Browse files
committed
refactor: allow libp2p to handle multiaddr validation
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 7fd8215 commit ec1ad3f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/core/components/swarm.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict'
22

3-
const multiaddr = require('multiaddr')
43
const promisify = require('promisify-es6')
54
const values = require('lodash/values')
65

@@ -67,10 +66,6 @@ module.exports = function swarm (self) {
6766
return callback(new Error(OFFLINE_ERROR))
6867
}
6968

70-
if (typeof maddr === 'string') {
71-
maddr = multiaddr(maddr)
72-
}
73-
7469
self._libp2pNode.dial(maddr, callback)
7570
}),
7671

@@ -79,10 +74,6 @@ module.exports = function swarm (self) {
7974
return callback(new Error(OFFLINE_ERROR))
8075
}
8176

82-
if (typeof maddr === 'string') {
83-
maddr = multiaddr(maddr)
84-
}
85-
8677
self._libp2pNode.hangUp(maddr, callback)
8778
}),
8879

0 commit comments

Comments
 (0)