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

Handle monetary amounts correctly #4

Closed
bugproof opened this issue Sep 18, 2021 · 1 comment
Closed

Handle monetary amounts correctly #4

bugproof opened this issue Sep 18, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bugproof
Copy link
Owner

bugproof commented Sep 18, 2021

Currently f64 is used which is not ideal.

Look for keywords "price", "paid", "amount", "rate"... and everywhere "f64" is used.

Either:

  • Use String for prices
  • Convert+operate on integers (cents)
  • Add dependency on some decimal crate
  • Use serde_json::Number
@bugproof bugproof added the enhancement New feature or request label Sep 18, 2021
@bugproof bugproof changed the title Use decimal crate for monetary amounts? Handle monetary amounts correctly Apr 14, 2022
@bugproof bugproof added the help wanted Extra attention is needed label Apr 14, 2022
@bugproof
Copy link
Owner Author

bugproof commented Jun 25, 2022

Added rust_decimal dependency as it makes the most sense and is close to .NET
b24c9e6

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

No branches or pull requests

1 participant