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

Commit 6613aa6

Browse files
mkg20001daviddias
authored andcommitted
feat: accept additional transports
1 parent f8dbe52 commit 6613aa6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/runtime/libp2p-browser.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ class Node extends libp2p {
2626
modules.discovery.push(r)
2727
}
2828

29+
if (options.modules && options.modules.transport) {
30+
options.modules.transport.forEach((t) => modules.transport.push(t))
31+
}
32+
33+
if (options.modules && options.modules.discovery) {
34+
options.modules.discovery.forEach((d) => modules.discovery.push(d))
35+
}
36+
2937
super(modules, peerInfo, peerBook, options)
3038
}
3139
}

0 commit comments

Comments
 (0)