robosats/frontend/src
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
..
basic Fix usenavigate PRO (#571) 2023-05-12 12:51:52 +00:00
components Fix bug with negative premium textfield (#614) 2023-05-26 10:32:22 +00:00
contexts Simplify and optimize nodeapp (#565) 2023-05-11 16:22:01 +00:00
i18n Enable Japanese on Android app 2023-05-02 03:08:27 -07:00
models Add core-lightning as backend lightning node vendor (#611) 2023-05-22 14:56:15 +00:00
pgp Add pgp signature to sensitive client - coordinator messages (#592) 2023-05-17 13:06:04 +00:00
pro Small fixes, fix reconnecting websockets, fix rewards webln 2023-05-08 17:37:23 -07:00
services Fix robosats on blixt's react-native-webview (#594) 2023-05-18 13:29:49 +00:00
utils Small fixes, fix reconnecting websockets, fix rewards webln 2023-05-08 17:37:23 -07:00
App.tsx Refactor context (#427) 2023-04-20 14:52:03 +00:00
index.js Refactor and Init RoboSats PRO (#296) 2022-10-20 11:06:16 -07:00