Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Change how account balances are stored in the db to facilitate many currency types #32

Closed
einsteinx2 opened this issue Jun 15, 2017 · 2 comments
Assignees

Comments

@einsteinx2
Copy link
Contributor

Right now we store account balances and transaction amounts in cents. That works for USD and other 2 decimal currencies, but doesn't work for things like bitcoin which have an indeterminate amount of decimal places. Also we make assumptions in the code when we do things like sorting by price that will need to take currencies into account.

For now, we don't need to figure everything out, since we aren't showing transactions yet, we just need a currency agnostic way to store the values for accounts that are still easily queryable.

@einsteinx2 einsteinx2 added this to the 1.0 Release milestone Jun 15, 2017
@einsteinx2 einsteinx2 self-assigned this Jun 15, 2017
@einsteinx2 einsteinx2 mentioned this issue Jun 15, 2017
4 tasks
@einsteinx2
Copy link
Contributor Author

For now I've decided to just add a decimals field to define the number of decimal places and continue to store the balances as integers. We can think about this more in the future.

@einsteinx2
Copy link
Contributor Author

Done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant