Skip to content

Conversation

@maxsam4
Copy link
Contributor

@maxsam4 maxsam4 commented Oct 5, 2018

Please check if the PR fulfills these requirements

  • The commit message follows our Submission guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

Multiply by a fixed amount for percentage calculation

What is the current behavior?

% is calculated assuming token has 18 decimals

What is the new behavior?

% is calculated using 18 decimals no matter how many decimals the token has

Does this PR introduce a breaking change?

No

Any Other information:

We could have either changed the natspec comment to mention that percentage is in (10 ^ (decimals - 2)) or just use fixed (18) decimals for calculation. I went with the latter.

@maxsam4 maxsam4 requested a review from satyamakgec October 5, 2018 08:43
@satyamakgec satyamakgec merged commit 3b7be9c into development-1.5.0 Oct 5, 2018
@maxsam4 maxsam4 deleted the percentage-fix branch October 10, 2018 09:38
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