robosats/frontend/static/locales
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
..
ca.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
collect_phrases.py Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
CONTRIBUTING.MD Add automatic i18n phrases collector (#359) 2023-02-21 17:33:52 +00:00
cs.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
de.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
en.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
es.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
eu.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
fr.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
handcrafted.py Fix collect_phrases.py to work on all OS (#607) 2023-05-22 08:14:22 +00:00
it.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
ja.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
pl.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
pt.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
ru.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
sv.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
th.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
zh-SI.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
zh-TR.json Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00