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.
* Improve clarity of swap orders
* Add descriptive send/receive amounts for swaps on Maker Page
* Add descriptive send/receive amounts for swaps on OrderDetails
* Collect new phrases
* Small fixes
* Add garage model
* Add robot select to profile
* Replace Robot for Garage init
* Add Garage inners, not re-rendering
* Revert
* Collect new phrases and small fixes
* Small fixes
* Fix unencrypted # hack on Turtle chat
* Small fixes and collect phrases
* Refactor fetchRobot
* Add appcontext
* Robot recovery fixes
* Add usecontext on maker and settings forms
* Add usecontext to booktable
* Add useContext to order page and main dialogs
* Small fixes
* Re-init new tradebox
* Wip progress on OrderDetails
* Wip 2 OrderDetails
* Fix multiple requests on load
* Add functional Order page
* Fixes order page
* Fix delete storage
* Fix order page style
* Add Public order prompt
* Add paused order prompt
* Add expired prompt
* Create statusToContract logics
* Move fetch order loop to Main
* Add payout and wait prompts
* Fix order fetch on badOrder
* Fix styles
* Add chat and dispute prompts
* Add remaining prompts
* Fix style
* Add notifications component
* Fix take order style, add more notifications
* Add page title notification
* Add more notifications and small tradebox fixes
* Small fixes
* Small fixes to routing failure prompt
* Remove old trade box
* Add bad take order
* Android Clipboard and Tor Status Icon
* working clipboard and lintern
* Fix
* Add style for Tor connection component
* Fix Freeze and Internet out
* Fix Typo
Co-authored-by: Reckless_Satoshi <reckless.satoshi@protonmail.com>
* Add stealth invoice switch to profile
* Add stealth invoice including only order uuid
* Add explanatory tooltip for stealth invoices and fix code smells
* Removed coinaddrvalidator dependency
* Return generic "Ivalid address" error message instead of the error returned by bitcoind when validating an address
* Modified messages related to bitcoin addresses validation