Skip to content

Conversation

@johnny9
Copy link
Collaborator

@johnny9 johnny9 commented May 8, 2025

This change introduces the multiple recipients controls to the Send form. It is enabled in the ellipses option menu by toggling on "Enable Multiple Recipients". This is stored as a QSetting for the user.

This PR depends on #448 which contains the

Screenshot from 2025-05-08 11-51-34
first implementation of the Send options menu.
Screenshot from 2025-05-08 11-51-26

@johnny9 johnny9 marked this pull request as draft May 8, 2025 15:39
@johnny9 johnny9 marked this pull request as ready for review May 29, 2025 04:51
Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b4e421e

  • the amount is not tied to each recipient. If I enter x at 1, all have amount x
  • small nit, could this be centered

Screenshot from 2025-05-30 13-26-54

@johnny9
Copy link
Collaborator Author

johnny9 commented May 31, 2025

b4e421e

* the amount is not tied to each recipient. If I enter x at 1, all have amount x

* small nit, could this be centered

Screenshot from 2025-05-30 13-26-54

I believe I have both of these issues resolved now with the latest commits.

@johnny9
Copy link
Collaborator Author

johnny9 commented May 31, 2025

Discovered an issue with the calculation of the total amount in the review ui and coin selection ui. Will resolve that today.

@johnny9
Copy link
Collaborator Author

johnny9 commented May 31, 2025

Discovered an issue with the calculation of the total amount in the review ui and coin selection ui. Will resolve that today.

This should be resolved now with the last two commits.

@GBKS
Copy link
Contributor

GBKS commented Jun 2, 2025

Looks great.

  1. There seems to be a small issue with the removal logic.
  • For recipients 1, 2, and 3, I respectively enter a, b and c into the Send to field
  • With recipient 1 selected, I click - to remove the current recipient (as expected)
  • A recipient is removed, I can tell from the header changing from Recipient 1 of 3 to Recipient 1 of 2
  • However, I still see a in the Send to field. I expected the current recipient to be removed and that I now would see b.
  • I click > and now see c in the Send to field
  • I click < and now see b in the Send to field

Not sure if that outline is easy to follow, but by guess is that the current recipient is correctly being removed, but the UI is not being refreshed.

  1. There are some visual tweaks to be made, but those can be done separately.

  2. Is there a limit on how many recipients can be added? Should we restrict it to something like 25 for now? Michael and I were wondering about that.

  3. Also, should the Note to self be per recipient or for the whole transaction? In the prototype I have it per recipient (essentially an address label). But in this implementation it's the same for all recipients.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 3, 2025

Looks great.

1. There seems to be a small issue with the removal logic.


* For recipients 1, 2, and 3, I respectively enter `a`, `b` and `c` into the `Send to` field

* With recipient 1 selected, I click `-` to remove the current recipient (as expected)

* A recipient is removed, I can tell from the header changing from `Recipient 1 of 3` to `Recipient 1 of 2`

* However, I still see `a` in the `Send to` field. I expected the current recipient to be removed and that I now would see `b`.

* I click `>` and now see `c` in the `Send to` field

* I click `<` and now see `b` in the `Send to` field

Not sure if that outline is easy to follow, but by guess is that the current recipient is correctly being removed, but the UI is not being refreshed.

I think this is the issue. I think I know what signal is missing and I will try it out.

2. There are some visual tweaks to be made, but those can be done separately.
3. Is there a limit on how many recipients can be added? Should we restrict it to something like 25 for now? Michael and I were wondering about that.

There is currently no limit. I'll put it at 25 just so we have something

4. Also, should the `Note to self` be per recipient or for the whole transaction? In the prototype I have it per recipient (essentially an address label). But in this implementation it's the same for all recipients.

I think per recipient/output might make more sense but i can see the value of per transaction. Note to self isn't implemented yet so that part of the form just goes no where. I still need to figure out what is supported currently in core for this as that might dictate which way we go.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 3, 2025

Update from e5cd1a7 to 8a6b593

  • rebased with main

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 3, 2025

Looks great.

1. There seems to be a small issue with the removal logic.
3. Is there a limit on how many recipients can be added? Should we restrict it to something like 25 for now? Michael and I were wondering about that.

These two issues are now resolved

@johnny9 johnny9 requested a review from MarnixCroes June 4, 2025 04:36
Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8a6b593
I found multiple things, probably some are to be fixed and some can be follow-up.

  • Have 2 recipients, delete recipient 2. It stays at recipient 2 and displays Recipient 2 of 1:

Screenshot from 2025-06-04 09-30-31

  • I noticed a delay in the coin selection Remaining to select / Over required amount, this does not happen on master
Screencast.from.2025-06-04.09-12-47.webm
  • Have multiple recipients, one in sats and the other in BTC -> the Transaction Details screen is confusing as it doesn't have units:

Screenshot from 2025-06-04 09-14-57

Some issues when having 2 or more recipients and disabling Multiple Recipients as the other disabled recipients are still taken into account:

  • After disabling multiple recipients, the Send view will show the current selected single recipient, but the amount in Transaction Details is the sum of the multiple recipients (even though disabled)
Screencast.from.2025-06-04.09-07-22.webm
  • Recipient 2 is empty, disable Multiple Recipients. Send view is at recipient 1 (with address and amount) but Review doesn't work.

@rabbitholiness
Copy link

I also noticed a few additional things to the ones mentioned above:

  • If I switch to Sats as a unit for the amount and then add a new recipient, the unit for that newly added recipient is changed to ₿. I would have expected it to also use Sats.
  • Since the address is on one line, it gets cut off. I guess the multi-line view just isn't implemented yet?
Screenshot 2025-06-05 at 9 08 43
  • If I use the same address for different recipients, then we should probably highlight that somehow. Based on how difficult it is to implement, there is a more generic way to just say "You're reusing this address for multiple recipients." But ideally we would say "This address is being reused for Recipient x and Recipient y." The names of the recipients could be a link to the corresponding form. Here's how that could look like.
    address reuse multiple recipients
  • I can't get to the review screen, for some reason.
  • I think the note to self should be per recipient. Especially since it should be used to identify the payments on the review screen (and on the transaction details page), eventually.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 6, 2025

8a6b593 I found multiple things, probably some are to be fixed and some can be follow-up.

* Have 2 recipients, delete recipient 2. It stays at recipient 2 and displays `Recipient 2 of 1`:

Found the off by one error. It should work correctly now.

Screenshot from 2025-06-04 09-30-31

* I noticed a delay in the coin selection `Remaining to select` / `Over required amount`, this does not happen on master

This is a similar fix to the validation. I've push the fix to this PR as well.

Screencast.from.2025-06-04.09-12-47.webm

* Have multiple recipients, one in sats and the other in BTC -> the Transaction Details screen is confusing as it doesn't have units:

The transaction details I will create a new task/issue as a follow up as I would like to do a bunch of amount labels at once.

Screenshot from 2025-06-04 09-14-57

Some issues when having 2 or more recipients and disabling Multiple Recipients as the other disabled recipients are still taken into account:

* After disabling multiple recipients, the Send view will show the current selected single recipient, but the amount in `Transaction Details` is the sum of the multiple recipients (even though disabled)

Screencast.from.2025-06-04.09-07-22.webm

* Recipient 2 is empty, disable `Multiple Recipients`. Send view is at recipient 1 (with address and amount) but `Review` doesn't work.

I now have it clearing out the list up to the first recipient when the setting is disabled and the amounts should be correct now.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 6, 2025

I also noticed a few additional things to the ones mentioned above:

* If I switch to Sats as a unit for the amount and then add a new recipient, the unit for that newly added recipient is changed to ₿. I would have expected it to also use Sats.

ok, I set the new recipient to use the current's units. if we want it to be global, I will create an issue and do a separate follow up as it requires some refactoring

* Since the address is on one line, it gets cut off. I guess the[ multi-line view](https://lively-kashata-cfde7e.netlify.app/screen/send) just isn't implemented yet?

yes I will fix the wrapping when i do the address formatting

Screenshot 2025-06-05 at 9 08 43
* If I use the same address for different recipients, then we should probably highlight that somehow. Based on how difficult it is to implement, there is a more generic way to just say "You're reusing this address for multiple recipients." But ideally we would say "This address is being reused for Recipient x and Recipient y." The names of the recipients could be a link to the corresponding form. Here's how that could look like.
  ![address reuse multiple recipients](https://private-user-images.githubusercontent.com/112604177/451751927-97e07352-1922-4c4e-82ab-18adde0ea9df.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkxODM5NTcsIm5iZiI6MTc0OTE4MzY1NywicGF0aCI6Ii8xMTI2MDQxNzcvNDUxNzUxOTI3LTk3ZTA3MzUyLTE5MjItNGM0ZS04MmFiLTE4YWRkZTBlYTlkZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYwNlQwNDIwNTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YTkyMWRiOGE3MjBiYWJjZTcxOGUxYTgwYTY4YTAwZWFjMTE5OTJlOTBlMjlkZDZiNDI2YzZmZmY4NTJkYTU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ZDrE85L9EC21gdVcs3xe1ziPF4-_7ih3HT6yDD1_Bvc)

i agree with this and will create a follow up task.

* I can't get to the review screen, for some reason.

that means an input was wrong. additional validation is needed to make that clear. hopefully the send validation PR catches what is missing in your case.

* I think the note to self should be per recipient. Especially since it should be used to identify the payments on the review screen (and on the transaction details page), eventually.

It should be. I think this is a bug.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 6, 2025

All comments have been addressed via a commit or new issue.

@GBKS
Copy link
Contributor

GBKS commented Jun 6, 2025

Awesome progress. Not sure if it's covered elsewhere, here are some things I am seeing based on the latest code:

  • I can enter infinite characters in the address, amount and note fields. Super long amounts end up overlapping the unit toggle and going outside of the form boundaries.
  • I can enter letter (abc...) in the amount input, should be just numbers and comma/period.
  • When enabling multiple recipients, it should automatically add a second one.
  • In the prototype, I set up an application-wide setting for the unit format. So if you toggle it in the form for one recipient, it also toggles it for all other recipients, the balance in the top left, any other screen you visit, etc. As a mental model, that seems easier track than having individual components have their own setting.
  • The disabled state for the pagination/add/remove buttons is super dark, it should be Neutral 4 instead of Neutral 2.
  • When a transaction was sent, the Multiple recipients setting should also reset to disabled. Weird to be on the screen and having it read Recipient 1 of 1.

@johnny9
Copy link
Collaborator Author

johnny9 commented Jun 6, 2025

Awesome progress. Not sure if it's covered elsewhere, here are some things I am seeing based on the latest code:

* I can enter infinite characters in the address, amount and note fields. Super long amounts end up overlapping the unit toggle and going outside of the form boundaries.

* I can enter letter (abc...) in the amount input, should be just numbers and comma/period.

These two are addressed in #462

* When enabling multiple recipients, it should automatically add a second one.

This makes sense, will add

* In the prototype, I set up an application-wide setting for the unit format. So if you toggle it in the form for one recipient, it also toggles it for all other recipients, the balance in the top left, any other screen you visit, etc. As a mental model, that seems easier track than having individual components have their own setting.

I'll make an issue to track this for a follow up. I need to refactor some things to get the setting to be global.

* The disabled state for the pagination/add/remove buttons is super dark, it should be Neutral 4 instead of Neutral 2.

Will fix.

* When a transaction was sent, the `Multiple recipients` setting should also reset to disabled. Weird to be on the screen and having it read `Recipient 1 of 1`.

Ill try to fix this as well.

Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ACK 5642319
LGTM for initial feature introduction

@hebasto hebasto merged commit 8f7f8bd into bitcoin-core:main Jul 2, 2025
9 checks passed
johnny9 pushed a commit to johnny9/bitcoin-core-app that referenced this pull request Jul 4, 2025
… Send form

676db23 Fix typo in MultipleSendReview (Johnny)
69c8d52 qml: Change IconButton disabled color to neutral4 (johnny9)
01affb5 qml: Disable multipleRecipients after clearing the recipients list (johnny9)
2b1d39d qml: Add a recipient when multiple recipients are enabled (johnny9)
2093017 qml: Connect Recipient label to Note to self input (johnny9)
ee08381 qml: New recipients use current's units (johnny9)
1e4159a qml: When multipleRecipients is disabled, clearToFront of the list (johnny9)
5114425 qml: Split amount and display updating for Bitcoin amount input (johnny9)
e29622c qml: Restrict Recipients to 25 (johnny9)
4872600 qml: Handle removal of first recipient properly (johnny9)
4d040e9 qml: Clear Send form after sending transaciton (johnny9)
33502e4 qml: Commit Recipient amount when active focus is lost (johnny9)
8a1dbe0 qml: Add total calculation to SendRecipientsListModel (johnny9)
2de4f26 qml: Cleanup BitcoinAmount (johnny9)
b94f2bb qml: Replace NavButton with IconButton in Send (johnny9)
d7d1d45 qml: Add plus big filled icon (johnny9)
2552e3f qml: Add MultipleSendReview page (johnny9)
bd3fac2 qml: Prepare transaction with recipients list (johnny9)
fdbaf00 qml: Add remove button to multiple recipients (johnny9)
1a8b696 qml: Reduce size of recipient selectors (johnny9)
34706bb qml: Add Multiple Recipients bar to Send form (johnny9)
191edb7 qml: Add Multiple Recipients toggle to Send menu (johnny9)
0cb338c qml: Introduce SendRecipientsListModel (johnny9)

Pull request description:

  This change introduces the multiple recipients controls to the Send form. It is enabled in the ellipses option menu by toggling on "Enable Multiple Recipients". This is stored as a QSetting for the user.

  This PR depends on #448 which contains the

  ![Screenshot from 2025-05-08 11-51-34](https://github.com/user-attachments/assets/c1756abd-b485-4cf1-b6a8-2c0fa91ff05a)
   first implementation of the Send options menu.
  ![Screenshot from 2025-05-08 11-51-26](https://github.com/user-attachments/assets/6ce9dd39-1b12-49dd-af50-2724fabbb8b9)

Top commit has no ACKs.

Tree-SHA512: 2f8f9e76eea107a898015966c6f838f303d7364852a26d0ab74dfb76bbf756563a9d29b0d6572c39b78ca23dc012c93af0fdcfa5d30f6bee693f8ac34c3b0c64
tx-signer450 added a commit to tx-signer450/gui-qml that referenced this pull request Oct 20, 2025
… Send form

676db23d9806e957c23aba87b4e6f83710bc7a38 Fix typo in MultipleSendReview (Johnny)
69c8d52bc0d46d55246d6100946d31b9ddb25bbf qml: Change IconButton disabled color to neutral4 (johnny9)
01affb56a067bc208294ac0aa5e49c3f94b025e7 qml: Disable multipleRecipients after clearing the recipients list (johnny9)
2b1d39d80c5423856b2ddd5f78263ff72a1f0292 qml: Add a recipient when multiple recipients are enabled (johnny9)
209301753610f6a4f1198616189959c150010a65 qml: Connect Recipient label to Note to self input (johnny9)
ee08381ed493bf97c24f148da81364341fd9b156 qml: New recipients use current's units (johnny9)
1e4159a1027c5f565e56286eb6c04fc57050ae87 qml: When multipleRecipients is disabled, clearToFront of the list (johnny9)
5114425d3f9567575a4d0c8ed61458dd2d3eccbb qml: Split amount and display updating for Bitcoin amount input (johnny9)
e29622c0ecd4bbf035cc77b66136e6d44ac29783 qml: Restrict Recipients to 25 (johnny9)
48726006684d39f4dccd0643b45284ff2ae30ede qml: Handle removal of first recipient properly (johnny9)
4d040e909dce7dd615f18558b27e8ad4a7ac5000 qml: Clear Send form after sending transaciton (johnny9)
33502e4a5f1797fcbdab85db274d49f8c7027ef3 qml: Commit Recipient amount when active focus is lost (johnny9)
8a1dbe03743c25e9567d54d03f6a285c61a8883e qml: Add total calculation to SendRecipientsListModel (johnny9)
2de4f268811f46999fa007e9cf419d3534eb7822 qml: Cleanup BitcoinAmount (johnny9)
b94f2bbb1339259955c1fac6a2bd81557c5b7330 qml: Replace NavButton with IconButton in Send (johnny9)
d7d1d45e302892e1a6fc90d9443f897ad9772d31 qml: Add plus big filled icon (johnny9)
2552e3f7c92f769439bb0536ef48c880a88bf8d5 qml: Add MultipleSendReview page (johnny9)
bd3fac2cfb011e1693c7c5c28bce2b3b3945d14a qml: Prepare transaction with recipients list (johnny9)
fdbaf00a2177412b9215128b7b60218568f9ee05 qml: Add remove button to multiple recipients (johnny9)
1a8b69612f5ab11f368322ce0b16fc3a18a06bee qml: Reduce size of recipient selectors (johnny9)
34706bb714fd14c26dee14d105da1be89e5e0a59 qml: Add Multiple Recipients bar to Send form (johnny9)
191edb7a1688a02a63839c334e1eea11e9e65a78 qml: Add Multiple Recipients toggle to Send menu (johnny9)
0cb338c913ff79454a51e1649140c1d40f28e6b6 qml: Introduce SendRecipientsListModel (johnny9)

Pull request description:

  This change introduces the multiple recipients controls to the Send form. It is enabled in the ellipses option menu by toggling on "Enable Multiple Recipients". This is stored as a QSetting for the user.

  This PR depends on #448 which contains the

  ![Screenshot from 2025-05-08 11-51-34](https://github.com/user-attachments/assets/c1756abd-b485-4cf1-b6a8-2c0fa91ff05a)
   first implementation of the Send options menu.
  ![Screenshot from 2025-05-08 11-51-26](https://github.com/user-attachments/assets/6ce9dd39-1b12-49dd-af50-2724fabbb8b9)

Top commit has no ACKs.

Tree-SHA512: 2f8f9e76eea107a898015966c6f838f303d7364852a26d0ab74dfb76bbf756563a9d29b0d6572c39b78ca23dc012c93af0fdcfa5d30f6bee693f8ac34c3b0c64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants