pampeanodev / btcretirementcalc

https://btcretirementcalc.vercel.app
9 stars 5 forks source link

[BUG] Annual estimated buy allows negative amounts #26

Closed cobo2bofb closed 6 months ago

cobo2bofb commented 6 months ago

[BUG] Annual estimated buy allows negative amounts

The calculator is allowing Negative Amounts of Bitcoin buying under certain conditions (more to be explore on this, since there could be other situations where this is also allowed)

This bug was seen under the following conditions that can be used to reproduce the issue as follows:

1) Setting up a positive number in the "Annual estimated buy" field. 2) Reducing the amount to the minimum value possible using the down arrow. (The minimum SHOULD BE ZERO, but for some reason it stops at 100) 3) Then manually editing the field with a random amount (example: 50). 4) Now if you keep pressing the down arrow, it keeps moving down using negative numbers in decrements of 100 each (e.g.: -50, -150, -250, etc)

[ACTION] Correct this bug to:

1) Allow the down arrow to move back to ZERO (instead of 100 which is currently the limit using the down arrow key) 2) Prevent the "Annual estimated buy" field from accepting negative amounts/values.