-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
CLI don't convert denominations automatically #7623
Comments
related cosmos/gaia#300 |
Yes, this is why I've added the |
9 tasks
yihuang
added a commit
to yihuang/cosmos-sdk
that referenced
this issue
Nov 16, 2020
fixes: cosmos#7623 - test order of decimal operations - support both int and decimal coins, truncate when normalizing to base unit
mergify bot
added a commit
that referenced
this issue
Nov 16, 2020
* cli: convert coins to smallest unit registered fixes: #7623 - test order of decimal operations - support both int and decimal coins, truncate when normalizing to base unit * Update types/coin_test.go * Update types/coin_test.go Co-authored-by: Alessio Treglia <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
yihuang
added a commit
to yihuang/cosmos-sdk
that referenced
this issue
Nov 27, 2020
* cli: convert coins to smallest unit registered fixes: cosmos#7623 - test order of decimal operations - support both int and decimal coins, truncate when normalizing to base unit * Update types/coin_test.go * Update types/coin_test.go Co-authored-by: Alessio Treglia <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
larry0x
pushed a commit
to larry0x/cosmos-sdk
that referenced
this issue
May 22, 2023
* cli: convert coins to smallest unit registered fixes: cosmos#7623 - test order of decimal operations - support both int and decimal coins, truncate when normalizing to base unit * Update types/coin_test.go * Update types/coin_test.go Co-authored-by: Alessio Treglia <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When we have multiple denominations of same coin, we should convert them automatically.
It's good to handle them at interface layer(cli or grpc).
We already have the
ConvertCoin
utility, so it should be trivial to implement this.We already did that in our chain by override cli commands (https://github.com/crypto-com/chain-main/blob/68a0f526b8844d75874582cde40561e1c8460f9d/x/staking/client/cli/tx.go#L121). it would be better to implement that in cosmos-sdk, we are happy to submit the PR.
Problem Definition
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: