-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some feedback on getBalanceAll implementation #2
base: feature/get-balance-all
Are you sure you want to change the base?
Some feedback on getBalanceAll implementation #2
Conversation
|
||
async.each(requests, getServerWithAuthWrapper, cb2); | ||
// return a list of promises that we can await or chain |
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.
it's not particularly necessary to do this (you can alternatively return a Promise.all), but this way is slightly more efficient
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.
(However, we'd need to resolve a representation of any error, which is kind of weird)
|
||
try { | ||
responses = await Promise.all( | ||
getServerWithMultiAuth(req, res, opts).map(promise => |
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.
my bad, we don't need to pass opts
here
You don't have to use these commits (I included a lot of comments and I haven't tested it with my changes yet)
But I think leveraging inheritance more in the bulk client class would be good
And most of the other updates are more stylistic or minute optimizations, so feel free to take or leave them