-
Notifications
You must be signed in to change notification settings - Fork 300
refactor: convert block API to async await #1153
Conversation
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.
LGTM
notes:
still bugs me a bit all the
const searchParams = new URLSearchParams()
const searchParams = new URLSearchParams(options.searchParams)
if (options.format !== undefined) {
searchParams.set('format', options.format)
}
if(options.format != null)
we have a couple of inconsistencies in there, maybe we could spend a little time finding a way to just pass options
to ky instead of new URLSearchParams
plus if clauses. @achingbrain you did a couple of changes to searchParams handling in ky
upstream do you think we can do this already or the undefined/null is still an issue for us ?
depends on: * [ ] #1150 License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
74ffbb1
to
43a60c2
Compare
const searchParams = new URLSearchParams() Agree, that shouldn't happen, we should allow them to be overridden with options on every API call. Along with const searchParams = new URLSearchParams(options.searchParams)
if (options.format !== undefined) {
searchParams.set('format', options.format)
}
if(options.format != null) Sometimes we check for |
@hugomrdias apologies I'm going to expand this PR to include the DAG API since it uses the block API. |
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
I think we should apply the robustness principal - that is, all the |
depends on: