Skip to content
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

don't pass empty newMethodCallback function to ethjs-query call #18

Closed
wants to merge 1 commit into from

Conversation

mikec
Copy link

@mikec mikec commented Apr 9, 2018

This change to ethjs-query ethjs/ethjs-query@dd1d1b2 will not return a promise if any callback function is passed. This breaks promise returns for .new(), since this was always passing a function through to the ethjs-query sendTransaction call. With this commit, the callback function will only be passed to sendTransaction if a callback was defined.

ethjs-contract

Thank you for contributing! Please take a moment to review our contributing guidelines
to make the process easy and effective for everyone involved.

Please open an issue before embarking on any significant pull request, especially those that
add a new library or change existing tests, otherwise you risk spending a lot of time working
on something that might not end up being merged into the project.

Before opening a pull request, please ensure:

  • You have followed our contributing guidelines
  • Pull request has tests (we are going for 100% coverage!)
  • Code is well-commented, linted and follows project conventions
  • Documentation is updated (if necessary)
  • Internal code generators and templates are updated (if necessary)
  • Description explains the issue/use-case resolved and auto-closes related issues

Be kind to code reviewers, please try to keep pull requests as small and focused as possible :)

IMPORTANT: By submitting a patch, you agree to allow the project
owners to license your work under the terms of the MIT License.

This change to ethjs-query ethjs/ethjs-query@dd1d1b2 will not return a promise if any callback function is passed. This breaks promise returns for `.new()`, since this was always passing a function through to the ethjs-query `sendTransaction` call. With this commit, the callback function will only be passed to `sendTransaction` if a callback was defined.
@coveralls
Copy link

coveralls commented Apr 9, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 5bdc0d6 on mikec:fix-promises into 7a75bfc on ethjs:master.

@SilentCicero
Copy link
Member

SilentCicero commented Apr 9, 2018 via email

@SilentCicero
Copy link
Member

SilentCicero commented Apr 9, 2018 via email

@SilentCicero
Copy link
Member

This and other things have been addressed in 2.0 @mikec thanks for the PR regardless!

@mikec mikec deleted the fix-promises branch April 18, 2018 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants