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

fix: loosen input type for swarm.connect and swarm.disconnect #3673

Merged
merged 1 commit into from
May 6, 2021

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented May 6, 2021

Accept peer ids as strings or multiaddrs as Multiaddrs.

Also removes accepting peerIDs as CIDs for consistency as I don't think we actually return peerIDs as CIDs from the api anywhere (from ipfs.swarm.peers, for example), only ever as strings.

Fixes #3638

Accept peer ids as strings or multiaddrs as Multiaddrs.

Fixes #3638
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏼 LGTM!

@achingbrain achingbrain merged commit 46618c7 into master May 6, 2021
@achingbrain achingbrain deleted the fix/accept-peerids-as-strings branch May 6, 2021 13:01
This was referenced Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Types] SwarmAPI.connect requires a Multiaddr but libp2p.dial allows PeerId|Multiaddr|string
2 participants