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

Bug: Rounding in BTC and loss of data #1592

Open
ChuckinBits opened this issue Jan 4, 2025 · 4 comments
Open

Bug: Rounding in BTC and loss of data #1592

ChuckinBits opened this issue Jan 4, 2025 · 4 comments
Labels
🐛 Bug Something isn't working Community OSS contributions accepted Low priority Contributions accepted, but Maybe team will not be working on this in the near term

Comments

@ChuckinBits
Copy link

First of all I want to thank you all for this awesome project! I am excited to see it develop.

Describe the bug
When setting amounts in BTC, Maybe correctly shows the appropriate amount of decimal places (8). However it always rounds to the 4th decimal place which always leaves 4 trailing zeros. When going back to edit the amount, the data from the last 4 decimal places is lost.

To Reproduce
Steps to reproduce the behavior:

  1. Add a any new account and change currency to BTC
  2. Enter 0.12345678
  3. See rounding to 0.12350000
  4. Go and edit the balance
  5. See 0.12350000 as the editable number

Expected behavior
Ideally I would expect to see the exact balance to 8 decimal places 0.12345678. If rounding must occur the following 0's should not display and the hidden numbers should be retained for editing and for precise calculations of future addition and rounding.

What version of Maybe are you using?
Self-hosted on Umbrel v0.2.0

@ChuckinBits ChuckinBits added the 🐛 Bug Something isn't working label Jan 4, 2025
@zachgoll zachgoll added 💻 Self Hosting Issues pertaining to self-hosted versions of Maybe Community OSS contributions accepted labels Jan 7, 2025
@zachgoll
Copy link
Collaborator

zachgoll commented Jan 7, 2025

@ChuckinBits we've got crypto support on the roadmap, but there are some structural changes we need to make to properly support it broadly:

  1. We should not have BTC (or other cryptos) as a supported "account currency". Instead, these cryptos should be treated as "holdings" (similar to how our "Investment holdings" work right now)
  2. We will need to change the Decimal types in the DB to support cryptos with even greater number of precision
  3. We need to add crypto prices to our provider, Synth (not planned anytime soon due to prioritization)

While we'd be happy to accept a patch for this, our broad recommendation based on the current state of the app and our roadmap is to not use the BTC as the currency for an account quite yet. I would track your BTC in your preferred fiat currency for now (i.e. USD).

CleanShot 2025-01-07 at 09 59 30

@zachgoll zachgoll added Low priority Contributions accepted, but Maybe team will not be working on this in the near term Community OSS contributions accepted and removed 💻 Self Hosting Issues pertaining to self-hosted versions of Maybe Community OSS contributions accepted labels Jan 7, 2025
@ChuckinBits
Copy link
Author

Understandable. However, I would like to see BTC (not other cryptos) remain as a supported account currency like it is now. There are a growing number of people using BTC as their unit of account/measure of net worth due to it being finite, decentralized, and having a fixed and predictable monetary policy. Your app is the only one I've found that allows this. It's a game changer to keep this feature. We can get holdings measured in fiat just about anywhere. Thanks for your consideration.

@zachgoll
Copy link
Collaborator

zachgoll commented Jan 7, 2025

@ChuckinBits are you saying that you've set your family preferred currency to BTC and you're tracking everything in reference to it? (i.e. your net worth graph and everything in the app is denominated in BTC?)

@ChuckinBits
Copy link
Author

@zachgoll Yes that is correct. It's quite amazing to be able to see debts and assets that are denominated in fiat automatically calculated into BTC net worth. Interestingly, the fiat to BTC conversion doesn't round to the 4th decimal place. I also found the assets and liabilities pie graph to the right of net worth seems to round to whole numbers.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working Community OSS contributions accepted Low priority Contributions accepted, but Maybe team will not be working on this in the near term
Projects
None yet
Development

No branches or pull requests

2 participants