Closed fromheten closed 8 years ago
We will want to store and do maths as integers since floating point math is not precise http://stackoverflow.com/questions/588004/is-floating-point-math-broken
When we support other currencies, we can translate from a "natural" currency number (like $5.67 or 5,67€) to our internal representation in pennies 567. Stripe is also storing the amount as an int for similar reasons https://stripe.com/docs/api#charge_object-amount
Looks good to me, opened issue #28 with the above comment for when we add currencies other than satoshi
Re: Integers for currencies: I'm with ya man, that is the way to go. I guess we just have to decide how precise we can be - or just use the lowest that is common in the region where the currency is used (so x.xx for dollars and euros and pound, x for yen, etc).
What the hell, Stripe write "öre" in here for describing pennies?! Is that a word in English?
Fixes #25
Currently the Content record type does not make sure we have currency and amount specified.
satoshi
. So currently, it can only be satoshi. Easy to validate ;).