ensure that all satoshi numbers are clamped to integer satoshis before being used anywhere
- On the front end (in javascript), satoshi numbers should be clamped to whole numbers with no decimal places before they are used in any way.
- The backend should assume integers on the inputs. I.e. The backend should not perform rounding because it could silence more significant errors.
Especially confirm at least these numbers are being handled correctly:
- pledge amounts, immediately when they are created so that they are stored in the db, sent to the plugin, etc. correctly.
- output amounts, immediately when they are created so that they are stored in the db, sent to the plugin, etc. correctly.
Currently, it looks like at least the output amount is not being properly clamped to an integer:
- The campaign output was 21.1 BCH
- The output number sent to the plugin is 2110000000.000...002