I am a fullstack and blockchain developer at tapro labs GmbH. I love learning, I love improving myself and I also love to play the guitar and video games.
We do not store floating point numbers in the database, but on the frontend we needed to allow users to change the amount. So for the presentation layer we had to convert from cents to floating point and then when we send the amount, back to the server, to cents.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Never store money in floating point numbers. Recipe for disaster. Integers almost always the safest way
That's right!
We do not store floating point numbers in the database, but on the frontend we needed to allow users to change the amount. So for the presentation layer we had to convert from cents to floating point and then when we send the amount, back to the server, to cents.