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.
* Added new Reviews section to README
* Updated version number number to latest for Athena Alpha guide
* Update README.md
* Added proposed Reviews section
* Added reviews section with a few starter sites
* Added Reviews section with a few starter sites
* Update home.md
* Added styles to align things
---------
Co-authored-by: Reckless_Satoshi <90936742+Reckless-Satoshi@users.noreply.github.com>
* Add CLN node backend image and service (#418)
* Add cln service
* Add hodlvoice Dockerfile and entrypoint
* Add lnnode vendor switch (#431)
* Add LNNode vendor switch
* Add CLN version to frontend and other fixes
* init
* first draft
* add unsettled_local_balance and unsettled_remote_balance
* gen_hold_invoice now takes 3 more variables to build a label for cln
* remove unneeded payment_hash from gen_hold_invoice
* remove comment
* add get_cln_version
* first draft of clns follow_send_payment
* fix name of get_lnd_version
* enable flake8
* flake8 fixes
* renaming cln file, class and get_version
* remove lnd specific commented code
* get_version: add try/except, refactor to top to mimic lnd.py
* rename htlc_cltv to htlc_expiry
* add clns lookup_invoice_status
* refactored double_check_htlc_is_settled to the end to match lnds file
* fix generate_rpc
* Add sample environmental variables, small fixes
* Fix CLN gRPC port
* Fix gen_hold_invoice, plus some other tiny fixes (#435)
* Fix channel_balance to use int object inside Amount (#438)
* Add CLN/LND volume to celery-beat service
* Add CLN/LND volume to celery-beat service
* Bump CLN to v23.05
* changes for 0.5 and some small fixes
* change invoice expiry from absolute to relative duration
* add try/except to catch timeout error
* fix failure_reason to be ln_payment failure reasons, albeit inaccurate sometimes
* refactor follow_send_payment and add pending check to expired case
* fix status comments
* add send_keysend method
* fix wrong state ints in cancel and settle
* switch to use hodlinvoicelookup in double_check
* move pay command after lnpayment status update
* remove loop in follow_send_payment and add error result for edge case
* fix typeerror for payment_hash
* rework follow_send_payment logic and payment_hash, watch harder if pending
* use fully qualified names for status instead of raw int
* missed 2 status from prev commit
* Always copy the cln-grpc-hodl plugin on start up
* Fix ALLOW_SELF_KEYSEND linting error
* Fix missing definition of failure_reason
---------
Co-authored-by: daywalker90 <admin@noserver4u.de>
* Fetch relay list from official lnproxy repo
My changes have been merged on the lnproxy.org repo, so RoboSats must not fetch from my fork of lnproxy anymore.
* Grant workflow job write perms
By default, the GITHUB_TOKEN only has read permissions. Write is required in order to update the list of relays.
* Update to latest version of checkout action
---------
Co-authored-by: +shyfire131 <shyfire131@shyfire131.net>
Changed handcrafted.py to use a OrderedDict instead of a dict (guarantee the order independant of the python version)
Moved the value of "../../src" to the variable "src_path" to improve readability, and reuse the value again later in code
Changed the "Look for all matching i18n keys" part of code to order the dirs and file in a independant OS way - alphabetical order using the "sort" func of list object
Changed the "Look for all matching i18n keys" part of code to collect all phrases in a OrderedDict (guarantee the order independant of the python version)
Changed the list indexing in filepath var (filepath[10:]) to the use of os.path.relpath(filepath, src_path) func to improve readability
Changed all_phrases to a OrderedDict (guarantee the order independant of the python version) and use update method of OrderedDict to add the files's phrases and handcrafted phrases to the OrderedDict in order
Changed the loop of matches to inside the if statement (if len(matches) > 0) to improve readability - if the "if statement" is false, the loop was never executed
Changed the "Load existing locale dics and replace keys" part of code to use OrderedDict in the new_phrases var to guarantee the order of the keys insert in json.dump in all OS
Changed the "Load existing locale dics and replace keys" part of code to not substitute the keys "#{counter}" to guarantee the order independant of the json file of the translation.
* Support newlines for sender
- add multiline prop
- default behavior is not to submit the form when enter is hit, so listen for keypresses and trigger a synthetic button click when enter is hit
- however shift+enter is reserved for newlines, so we also check for those
* Support newlines for receiver
If decrypted message containes newlines, split and render on multiple lines
* Also add newline support for turtle mode senders
* Styling adjustment for send button
* Implement styling feedback
---------
Co-authored-by: +shyfire131 <shyfire131@shyfire131.net>
Created new state var amountRangeEnabled to control the new switch when advanced options is enabled.
Created memo var makerHasAmountRange to control boolean state of amount exact/range switch using maker.advancedOptions and amountRangeEnabled.
Used makerHasAmountRange instead of maker.advancedOptions when testing if maker is using amount range or exact amount (changeds places: handleCreateOrder, disableSubmit, amountToString in SummaryText, and in the Amount fields).
Change the default value of amountRageEnabled
Changed the default value of state var "amountRageEnabled" to true, and removed unnecessary use of the method "setAmountRangeEnabled" when chaging between advanced and default options.
Fix style of switch Exact/Range Amount
Fixing the style of the div of the "Exact/Range Amount" Switch removing the unecessary "width" and "height" props and adding a negative marginTop to reduce the gap between buy/sell buttons and the amount input commented in the PR, and added a padding bottom to the label of the amount (exact) to not hide the switch.
Inverting the position of the icon to match the style of the "Advanced Options" Switch.
Fixing the title from tooltip of the switch (the order of the titles was inversed and the text of the Exact Amount was wrong).
Define style of Exact/Range Amount Switch
Last change in the style of the new Exact/Range Amount Switch, following the review recommendations.