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

FormatCoins problem with representations of numbers less than zero #337

Closed
AntiD2ta opened this issue Feb 7, 2020 · 0 comments · Fixed by #338
Closed

FormatCoins problem with representations of numbers less than zero #337

AntiD2ta opened this issue Feb 7, 2020 · 0 comments · Fixed by #338
Assignees
Labels
bug Something isn't working stdev wip Work in progress
Milestone

Comments

@AntiD2ta
Copy link
Contributor

AntiD2ta commented Feb 7, 2020

Describe the bug
Currently util.FormatCoins function does not allow representations of numbers that are less than the respective accuracy for that number.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Make a transaction of an amount less than zero
  2. Run the app
  3. Go to a page where you can see the transaction or look for Outputs page
  4. See the amount, you should see 0 instead of 0.XXX

Expected behavior
The number should be represented properly, as 0.XXX with all its decimal digits

Possible implementation
Because several accuracy values ​​are powers of 10, we can cleanly divide the number by its accuracy when it is less than the accuracy.

@AntiD2ta AntiD2ta added bug Something isn't working stdev wip Work in progress labels Feb 7, 2020
@AntiD2ta AntiD2ta added this to the 0.27.0 milestone Feb 7, 2020
@AntiD2ta AntiD2ta self-assigned this Feb 7, 2020
@AntiD2ta AntiD2ta added this to To do in FiberCrypto wallet - Iteration 1 via automation Feb 7, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 7, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 7, 2020
AntiD2ta added a commit to simelo/fibercryptowallet that referenced this issue Feb 7, 2020
FiberCrypto wallet - Iteration 1 automation moved this from To do to Done Feb 8, 2020
olemis added a commit that referenced this issue Feb 8, 2020
…s_representation_of_small_numbers

Fixes #337 - FormatCoins problem with representations of numbers less than zero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stdev wip Work in progress
1 participant