-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Improve Adding/deleting recipients in Send , and move the recipient to a webcomponent #1782
UI: Improve Adding/deleting recipients in Send , and move the recipient to a webcomponent #1782
Conversation
src/cryptoadvance/specter/templates/includes/recipient-box.html
Outdated
Show resolved
Hide resolved
I like the structure in d6c8689 - excellent work overall, @relativisticelectron. I just have one comment (see above). |
Thanks. It was my first web component. Thanks for all the feedback; it helped me a lot. |
src/cryptoadvance/specter/templates/includes/recipient-box.html
Outdated
Show resolved
Hide resolved
src/cryptoadvance/specter/templates/wallet/send/new/wallet_send.jinja
Outdated
Show resolved
Hide resolved
src/cryptoadvance/specter/templates/includes/recipient-box.html
Outdated
Show resolved
Hide resolved
src/cryptoadvance/specter/templates/wallet/send/new/wallet_send.jinja
Outdated
Show resolved
Hide resolved
@relativisticelectron I made a few comments for final optimisations. Great solution with 85a4777. No we can just keep fillform as it is. This will definitely be used in an extension etc. Thanks for all the work! |
@moneymanolis : Could you test the liquid unit changer? |
Looks good!
OK, will do! |
I've tested with a Elements Regtest node: The asset selector works if we take the highlighted second condition out of this line: Looks like this then: I suppose the condition means that there are no other "assets" than LBTC in the wallet (because if there are there would be more to select from). I will double check with Stepan on how to proceed, he has implemented all the Liquid stuff and I still don't (want to? :-)) grasp it. EDIT: Also works with Not sure whether we need 10-8 here: |
OK. :-) That is as far as I got too... I was able to setup an elements node (in regtest), but "generatetoaddress" just didn't work. So I was unable to create funds or other assets. Also linking elements to the bitcoin regtest node failed for me..... |
You can run elements "in isloation" (not connected to Bitcoin Core) if you use I am just posting a sample conf here (the testnet part is from a blockstream link):
EDIT: Link to a faucet: https://liquidtestnet.com/faucet |
Yes, the PR works in the same way as on master, but I am wondering whether it would not be better to have at least a separate unit logic if a Liquid wallet has ONLY LBTC (probably the most likely case for a user currently), I just hacked it to show: Basically an elif ( IMO this could also be done in a separate PR. Just checking whether it makes sense at all. EDIT: Created an issue out of this: #1830 |
…elativisticelectron/specter-desktop into 20220828_recipients_without_SortableJS
…elativisticelectron/specter-desktop into 20220828_recipients_without_SortableJS
@relativisticelectron regarding 267cb99 initiating |
Thanks for fixing that. |
Follow up on: #1747
TODO:
console.log
s after review (this will allow fast debugging if needed)Notable changes:
recipient-box
has a propteryvalue
which contains a dictionary like:value
s of allrecipient-box
es are then combined before form submission to a dictionary, jsonified and stored in an hidden inputrecipient_dicts
and then available in request.form (Other methods of making the fields available for request.form did not work and are less elegant.). This will allow in the future to unify some code fromPsbtCreator.paymentinfo_from_ui
andPsbtCreator.paymentinfo_from_json
Breaking API changes:
Changed
subtract_from
to start from0
, relevant forpaymentinfo_from_json
seespecter-desktop/src/cryptoadvance/specter/commands/psbt_creator.py
Line 198 in 5f82e2a
specter-desktop/src/cryptoadvance/specter/commands/psbt_creator.py
Line 299 in 5f82e2a