Skip to content

Commit 87c1898

Browse files
fix(SwarmApi): allow ipfs or p2p in an address #37
1 parent 9731101 commit 87c1898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CoreApi/SwarmApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal SwarmApi(IpfsClient ipfs)
5151
var address = new MultiAddress(parts[0]);
5252
return new Peer
5353
{
54-
Id = address.Protocols.First(p => p.Name == "ipfs").Value,
54+
Id = address.PeerId,
5555
ConnectedAddress = parts[0],
5656
Latency = Duration.Parse(parts[1])
5757
};

0 commit comments

Comments
 (0)