-
Notifications
You must be signed in to change notification settings - Fork 28
fix: ensure all addresses are multiaddr #16
Conversation
|
||
exports = module.exports = Peer | ||
|
||
function ensureMultiaddr (addr) { | ||
if (addr instanceof multiaddr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail in times there is a version difference. I know that ideally we have the latest version of multiaddr everywhere, but we can't be 100% sure of that. Would be better to do duck typing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add Multiaddr.isMultiaddr
to the multiaddr
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dignifiedquire thank you :) Other than the |
@dignifiedquire could you rebase and finish up this PR? Thank you |
aa9e50e
to
a89f221
Compare
a89f221
to
2cfac63
Compare
@diasdavid ready once the referenced PR is merged and released |
No description provided.