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

Make the transaction visualiser amount rounding/truncation a little smarter #238

Closed
neilcampbell opened this issue Aug 26, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@neilcampbell
Copy link
Contributor

neilcampbell commented Aug 26, 2024

Values like 0.000115A are being rounding to ≈0.00012A, to ensure the amount fits within the small space we have.
In this scenario we have the space, so it'd be good to add a little more logic to try prevent the rounding where possible.

@neilcampbell neilcampbell added the enhancement New feature or request label Aug 26, 2024
@neilcampbell neilcampbell added this to the Enhancements milestone Aug 26, 2024
@neilcampbell
Copy link
Contributor Author

@neilcampbell neilcampbell changed the title Make the transaction visualiser amount truncation a little smarter Make the transaction visualiser amount rounding/truncation a little smarter Aug 26, 2024
@algorandfoundation algorandfoundation deleted a comment Aug 26, 2024
@algorandfoundation algorandfoundation deleted a comment Aug 26, 2024
@neilcampbell
Copy link
Contributor Author

@satishccy Some additional context for this one.
To fix this it's probably changing this line https://github.com/algorandfoundation/algokit-lora/blob/main/src/utils/compact-amount.ts#L4 from 8 to 9.
Whilst it's likely an easy fix, it'll require some visual verification/checks.
You'll also need to re-run the tests, re-generate test snapshots and visually inspect the transactions in those snapshots to confirm everything looks ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant