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

Implements sha3Raw and soliditySha3Raw #3226

Merged
merged 7 commits into from
Nov 21, 2019
Merged

Implements sha3Raw and soliditySha3Raw #3226

merged 7 commits into from
Nov 21, 2019

Conversation

nivida
Copy link
Contributor

@nivida nivida commented Nov 20, 2019

Description

Fixes #1961

This PR does fix the referenced "bug" above where you get returned null instead of the hash.

@cgewecke I'm open for better function names ;)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test with success and extended the tests if necessary.
  • I ran npm run build and tested the resulting file from dist folder in a browser.
  • I have tested my code on the live network.

@nivida nivida added Bug Addressing a bug 1.x 1.0 related issues labels Nov 20, 2019
@nivida nivida marked this pull request as ready for review November 20, 2019 12:07
@nivida nivida requested a review from cgewecke November 20, 2019 12:07
@coveralls
Copy link

coveralls commented Nov 20, 2019

Coverage Status

Coverage increased (+0.08%) to 84.426% when pulling d9563da on issue/1961 into 0109937 on 1.x.

@cgewecke cgewecke self-requested a review November 20, 2019 17:49
Copy link
Collaborator

@cgewecke cgewecke left a comment

Choose a reason for hiding this comment

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

This LGTM! Really nice.

Only thing I can think of that might be useful to add to the tests is maybe one non-empty-string test case borrowed from the other sha tests, just so the basic functionality is covered in case someone accidentally changes logic later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

web3.utils.sha3 and web3.utils.soliditySha3 return null when an empty byte sequence is hashed
3 participants