Commit 291e79f 1 parent 59ea9c3 commit 291e79f Copy full SHA for 291e79f
File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ class Node extends EventEmitter {
93
93
let transports = this . modules . transport
94
94
95
95
transports = Array . isArray ( transports ) ? transports : [ transports ]
96
+
97
+ // so that we can have webrtc-star addrs without adding manually the id
98
+ this . peerInfo . multiaddrs = this . peerInfo . multiaddrs . map ( ( ma ) => {
99
+ if ( ! mafmt . IPFS . matches ( ma ) ) {
100
+ ma = ma . encapsulate ( '/ipfs/' + this . peerInfo . id . toB58String ( ) )
101
+ }
102
+ return ma
103
+ } )
104
+
96
105
const multiaddrs = this . peerInfo . multiaddrs
97
106
98
107
transports . forEach ( ( transport ) => {
@@ -107,13 +116,6 @@ class Node extends EventEmitter {
107
116
}
108
117
} )
109
118
110
- // so that we can have webrtc-star addrs without adding manually the id
111
- this . peerInfo . multiaddrs = this . peerInfo . multiaddrs . map ( ( ma ) => {
112
- if ( ! mafmt . IPFS . matches ( ma ) ) {
113
- ma = ma . encapsulate ( '/ipfs/' + this . peerInfo . id . toB58String ( ) )
114
- }
115
- } )
116
-
117
119
this . swarm . listen ( ( err ) => {
118
120
if ( err ) {
119
121
return callback ( err )
You can’t perform that action at this time.
0 commit comments