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

(Fix) Cast to bigNumber values returned by contracts #709

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

fernandomg
Copy link
Contributor

Closes #706

In spite of what's pointed out in the bug details, this bug was caused by treating values returned by contracts as numbers and not as bigNumber.

There were values not being properly converted: weiRaised and tokensSold. And to prevent any possible issue, I also did changes to investors.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1752

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 15.673%

Totals Coverage Status
Change from base Build 1744: 0.02%
Covered Lines: 388
Relevant Lines: 1980

💛 - Coveralls

Copy link
Collaborator

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

@fernandomg the changes fix the issue, but maybe we can force convert input to string here

const number = new BigNumber(value)
also, as @rstormsf suggested? It is not so big change but could rid of a possible headache.

@fernandomg
Copy link
Contributor Author

fernandomg commented Mar 16, 2018

@vbaranov BigNumberInputs are of type text

I can make that conversion, but will be redundant and unnecessary in this case.

@vbaranov vbaranov self-requested a review March 16, 2018 15:42
@vbaranov vbaranov merged commit 2c751b7 into master Mar 16, 2018
@ghost ghost removed the awaiting for review label Mar 16, 2018
@vbaranov vbaranov deleted the fix-numbers-operations-#706 branch March 16, 2018 15:42
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.

3 participants