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

dht.provide() should accept string keys (#2573) #2589

Merged
merged 3 commits into from
Nov 11, 2019
Merged

Conversation

reasv
Copy link
Contributor

@reasv reasv commented Nov 6, 2019

Solving #2573
ipfs.dht.provide() now accepts strings as well as CID objects, and attempts to convert them to the latter.

@reasv
Copy link
Contributor Author

reasv commented Nov 6, 2019

Failed because of a linting issue

@reasv
Copy link
Contributor Author

reasv commented Nov 6, 2019

Pushed a fix

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

Code change LGTM. It would be rad to get a test added for this in the interface-ipfs-core tests.

You could probably copy+paste this test and remove the new CID part https://github.com/ipfs/interface-js-ipfs-core/blob/b4c3ce6d1aac503f05e301c4f09d0590511384ca/src/dht/provide.js#L79-L90.

@reasv
Copy link
Contributor Author

reasv commented Nov 7, 2019

I'll do it

@reasv
Copy link
Contributor Author

reasv commented Nov 9, 2019

ipfs-inactive/interface-js-ipfs-core#555

@alanshaw
Copy link
Member

Thanks @reasv 🥰

@alanshaw alanshaw merged commit 53c2144 into ipfs:master Nov 11, 2019
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.

2 participants