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

Remove trailing .0 in Tx Amounts #96

Open
murisi opened this issue Dec 7, 2024 · 0 comments
Open

Remove trailing .0 in Tx Amounts #96

murisi opened this issue Dec 7, 2024 · 0 comments

Comments

@murisi
Copy link
Contributor

murisi commented Dec 7, 2024

Sometimes the Namada Ledger app prints out a redundant trailing .0 when printing out Tx Amounts. For example 10.0 and 133.0 instead of just 10 and 133. More concretely, see attached test vectors that currently fail due to this .0 issue here: decimal_point_testvectors.json Though transaction displays are still correct with trailing .0s, this fractional part does not convey any information about the token denomination (since most of the zeros have already been stripped). Worse still, they complicate the test vector generation code a little since we need to exactly match Ledger app outputs for our CI to pass. Could these trailing .0s be removed?

I think the redundant zero (that is causing our mismatch) is left behind in the call at

number_inplace_trimming(strAmount, 1);
. Thanks!

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

1 participant