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

hexToNumberString sometimes interprets string as decimal #2184

Closed
wjmelements opened this issue Jan 12, 2019 · 4 comments · Fixed by #2884
Closed

hexToNumberString sometimes interprets string as decimal #2184

wjmelements opened this issue Jan 12, 2019 · 4 comments · Fixed by #2884
Labels
Bug Addressing a bug

Comments

@wjmelements
Copy link

> web3.utils.hexToNumberString('13')
'13'
@nivida nivida added the Bug Addressing a bug label Jan 18, 2019
princesinha19 added a commit to princesinha19/web3.js that referenced this issue Mar 26, 2019
…ue to number string. Also, solved a similar bug on line 271.
@levino
Copy link
Contributor

levino commented Apr 15, 2019

Thank you for this issue. Please link to the subpage in the docs where the expected behaviour is documented.

@levino
Copy link
Contributor

levino commented Apr 15, 2019

@levino
Copy link
Contributor

levino commented Apr 15, 2019

When I read the docs it looks to me as if a hex-string must be prefixed with 0x, right? What is the expected behaviour from the documentation? So the issue should rephrased to:

Throw error when argument of hexToNumberString is not prefixed with 0x.

@levino
Copy link
Contributor

levino commented Apr 15, 2019

This should be made ready for dev and then go directly to "To Do" as a bug.

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

Successfully merging a pull request may close this issue.

3 participants