This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dht.provide() doesn't accept strings #2573
Labels
exp/novice
Someone with a little familiarity can pick up
P4
Very low priority
status/ready
Ready to be worked
Comments
I would also like to add that the other errors it's giving me are rather opaque. |
I can make a pull request with the fix I proposed if you think that it would be ok |
🙏 yes please @reasv - it would also be good to get an update to the docs if you have time! ❤️ |
alanshaw
added
exp/novice
Someone with a little familiarity can pick up
P4
Very low priority
status/ready
Ready to be worked
labels
Nov 4, 2019
Ok. I will do this later today or tomorrow. |
reasv
added a commit
to reasv/js-ipfs
that referenced
this issue
Nov 6, 2019
alanshaw
pushed a commit
that referenced
this issue
Nov 11, 2019
resolved by #2589 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
exp/novice
Someone with a little familiarity can pick up
P4
Very low priority
status/ready
Ready to be worked
Type:
Bug
Severity:
Medium
Description:
ipfs.dht.provide() doesn't accept a string as input. It exclusively accepts a CID instance object.
This is inconsistent with how dht.findProvs() works, and it's not even hinted at in the documentation.
The error returned for giving it a string is "not a valid CID" which is also very opaque and confusing.
I would suggest to either update the documentation or to modify the function to do something like const cid = new CID(string_argument) in order to support a string-based argument.
The text was updated successfully, but these errors were encountered: