robosats/frontend/static
João Leal 9a1007775f
Fix bug with negative premium textfield (#614)
Fixing the type handlePremiumChange function to handle the discount to the right type (React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>)

Using the correct type of handlePremiumChange function, then deconstructing the "value" var from the event.target

Using Number(value) in declaration of "newPremium", instead of using multiplication with number and string

To not affect another methods using "premium" var, I used isNaN func to make a check and set the initial value of "premium" var to zero (if is NaN) or newPremium (when valid number is entered)

The fix in the bug is the line "premium: isNaN(newPremium) || value === '' ? '' : premium," in setMaker. That makes the "premium" var to be set to zero when the input is empty or not a number, allowing the user to input the "-" (minus sign) and not entering 0 as before.
2023-05-26 10:32:22 +00:00
..
assets Simplify frontend/client dev setup, shrink nodeapp 2023-05-12 04:07:56 -07:00
css Simplify frontend/client dev setup, shrink nodeapp 2023-05-12 04:07:56 -07:00
css_pro Add RoboSats PRO frame as react layout grid playground (#299) 2022-10-22 14:32:33 +00:00
locales Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
federation.json Add advanced options to LN payout form (#326) 2022-11-24 17:42:30 +00:00
lnproxies.json Fix lnproxy support and add lnproxy relays workflow (#586) 2023-05-18 11:14:11 +00:00