Skip to content

Increase default decimal precision#542

Closed
glowacki-dev wants to merge 3 commits intoafadil:mainfrom
glowacki-dev:feat/increase-decimal-precision
Closed

Increase default decimal precision#542
glowacki-dev wants to merge 3 commits intoafadil:mainfrom
glowacki-dev:feat/increase-decimal-precision

Conversation

@glowacki-dev
Copy link

Default harcoded decimal precision of 6 becomes problematic when tracking cryptocurrency transactions. Lots of them are divisible with a higher precision which causes small rounding errors when tracking values and holdings.
Most of the time it would be negligible (it would be sub-cent difference) but a difference of 0.000001 BTC is roughly $0.1 which can add up to significant numbers with multiple transactions.

Changes made:

  • Increase default precision from 6 to 8 (enough to accurately track BTC holdings)
  • Replaced hardcoded precision in UI components with constants, which would make it easier to change when needed and keep in sync with backend
  • Updated asset lots table to properly format asset quantity

This PR isn't a real fix for the underlying issue - to do this the precision should probably be user-configurable or automatically determined based on tracked assets. It makes the issue less annoying though and lays some groundwork for allowing proper configuration for this value

@afadil
Copy link
Owner

afadil commented Mar 1, 2026

is it possible to update this PR?
Thanks

@afadil
Copy link
Owner

afadil commented Mar 6, 2026

done in v3.0.4

@afadil afadil closed this Mar 6, 2026
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

Successfully merging this pull request may close these issues.

2 participants