Skip to content

chore: format arktoshi#1900

Closed
zillionn wants to merge 9 commits intoArkEcosystem:developfrom
zillionn:format-arktoshi
Closed

chore: format arktoshi#1900
zillionn wants to merge 9 commits intoArkEcosystem:developfrom
zillionn:format-arktoshi

Conversation

@zillionn
Copy link
Copy Markdown
Contributor

@zillionn zillionn commented Dec 22, 2018

Proposed changes

Very often I have hard time reading the amount/fee in the logs, for example:
0.00765 Ѧ
I'm not sure is this 765,000 arktoshi or is it 76,500?! Also to figure this out, you must know the network's decimal places.

IMO it should be printed like this:
Ѧ0.00765000

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@zillionn zillionn changed the title chore: format arktoshi [WIP] chore: format arktoshi Dec 22, 2018
@zillionn
Copy link
Copy Markdown
Contributor Author

Hm, is there an easy way to hide the zeros if it's a whole number when using toLocaleString .minimumFractionDigits: 8? Because 765000 becomes 0.00765000 but 10000000000 also becomes 10.00000000.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 22, 2018

Codecov Report

Merging #1900 into develop will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1900      +/-   ##
===========================================
+ Coverage    39.04%   39.06%   +0.02%     
===========================================
  Files          350      350              
  Lines         7658     7661       +3     
  Branches      1162     1149      -13     
===========================================
+ Hits          2990     2993       +3     
  Misses        4654     4654              
  Partials        14       14
Impacted Files Coverage Δ
packages/crypto/src/utils/format-arktoshi.ts 100% <100%> (ø) ⬆️
packages/core-logger-winston/src/formatter.ts 0% <0%> (ø) ⬆️
packages/core-test-utils/src/generators/wallets.ts 85.71% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64e290c...89125cf. Read the comment docs.

@zillionn zillionn changed the title [WIP] chore: format arktoshi chore: format arktoshi Dec 22, 2018
@faustbrian faustbrian requested a review from spkjp December 24, 2018 04:09
@paroxysm
Copy link
Copy Markdown
Contributor

Maybe you can print the Arktoshi value a long side it to help? I don't see how it's confusing.

@zillionn
Copy link
Copy Markdown
Contributor Author

@paroxysm Currently it's printer like this 0.000007. How much "toshi" is this?

@paroxysm
Copy link
Copy Markdown
Contributor

paroxysm commented Dec 26, 2018

I'm not reading that in arktoshi, I'm reading that in Ark. If I wanted the Arktoshi value, I'd multiply that by 1e8. I'm saying, reading the value as Ark is the standard but, you can add supplementary info to display in Arktoshi, but keep the standard.

@zillionn
Copy link
Copy Markdown
Contributor Author

You don't understand me, but I guess nobody else agrees with me so I'm closing this.

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