-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
TruncateDecimal() output is not correct #6763
Comments
I'm not sure what you mean by dependency? Coins are always returned in sorted order, regardless of the API. |
There is a test case in #6764, which is failing only because I change the name of the token. func TestSimulateMsgWithdrawValidatorCommission(t *testing.T) {
testSimulateMsgWithdrawValidatorCommission(t, "atoken")
// TODO: Fix following test: It is failing because of issue #6763
// testSimulateMsgWithdrawValidatorCommission(t, "tokenxxx")
} |
Can you elaborate on how it's failing? Also, I've commented on that PR, you have to use |
At some point we are subtracting the |
using |
Awesome! Can we close this issue? |
Yes, please. |
Summary of Bug
The output of
TruncateDecimal
is not correct because the first output (truncatedCoins
) is a slice of coins whose ordering very much dependent from the coins name. This creates a dependency with the name of the coins which is not good.Version
master branch: latest commit
Steps to Reproduce
for more details we can examine this test:
in the above case we believe the ordering of
commission1
is wrong and the output should look something like this:For Admin Use
The text was updated successfully, but these errors were encountered: