-
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
gRPC query returns non-decimaled value for DecCoin objects #13128
Comments
Very odd, they both get string-ified, so I'm not sure how this could happen. @facundomedica or @julienrbrt do you think you could confirm this? I mean querying against the Hub should be able to check really quickly |
Yes, I can confirm this is behaving as reported by @minxylynx, both rest & CLI are working as expected, but
grpcurl :
|
@facundomedica QueryDelegationRewardsResponse Rewards is of type |
Is this this the only query like that? |
No |
Replacing sdk.Dec with a better solution is something I've been hoping we can do for years. #10863 I believe describes what is actually causing this |
closing in favour of #10863 |
Summary of Bug
When querying via CLI, any response that returns a DecCoin value has the decimal point in the proper place. However, when querying via grpcurl for the same value, the decimal point goes missing. This also occurs when using the gRPC queries via code.
This makes it difficult to be sure you have the correct value, when you have to make an assumption of how many decimal places should be there.
Version
v0.45.4
Steps to Reproduce
Example via CLI:
Example via grpcurl
The text was updated successfully, but these errors were encountered: