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

fix: multiaddr validation to add peer id for listening #2833

Merged
Merged
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
3 changes: 2 additions & 1 deletion packages/ipfs/src/core/components/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ module.exports = ({
config.Addresses.Swarm.forEach(addr => {
let ma = multiaddr(addr)

if (ma.getPeerId()) {
const maId = ma.getPeerId()
if (maId && maId !== peerInfo.id.toB58String()) {
ma = ma.encapsulate(`/p2p/${peerInfo.id.toB58String()}`)
}

Expand Down