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

Problem: no decimal CRO display for account balance #29

Closed
leejw51crypto opened this issue Sep 7, 2020 · 4 comments
Closed

Problem: no decimal CRO display for account balance #29

leejw51crypto opened this issue Sep 7, 2020 · 4 comments
Assignees

Comments

@leejw51crypto
Copy link
Contributor

leejw51crypto commented Sep 7, 2020

add all denom into cro
display with decimal

currently, it displays separately, when you run
query account
use ConvertDenom

for example)
10 cro
2 mcro
3 ucro
5 ncro

change to

10.002003005 CRO

@tomtau
Copy link
Contributor

tomtau commented Sep 8, 2020

one trouble here is that decimal separators vary by country: https://en.wikipedia.org/wiki/Decimal_separator (so the display may be according to local settings and/or also display the base unit amount to disambiguate / make it clear)

@tomtau
Copy link
Contributor

tomtau commented Sep 15, 2020

this package should be able to do it: https://godoc.org/golang.org/x/text/message

@leejw51crypto
Copy link
Contributor Author

started

@leejw51crypto leejw51crypto self-assigned this Sep 17, 2020
@leejw51crypto
Copy link
Contributor Author

chain-maind api working, will submit pr

leejw51crypto added a commit that referenced this issue Sep 21, 2020
move prefix to module

add 1_cro_in_carson unit

tidy up error names
leejw51crypto added a commit that referenced this issue Sep 21, 2020
move prefix to module

add 1_cro_in_carson unit

tidy up error names

fix unit test
@tomtau tomtau closed this as completed in 5d38111 Sep 22, 2020
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

No branches or pull requests

2 participants