fix(create_tx): enforce single recipient for send_all#291
Conversation
va-an
left a comment
There was a problem hiding this comment.
The handlers.rs fix looks good.
As discussed in #225 (comment) we're moving away from this style of testing (driving the binary as a subprocess), so I'd suggest not adding tests in this PR and dropping the new test file. We can add proper coverage as a follow up after #278 and #289 are merged.
Previously, passing multiple --to arguments with --send_all would silently drain the wallet to only the first recipient, ignoring the rest. This was inconsistent with the silent-payments create_tx, which already validates the recipient count. Now returns an error unless exactly one recipient is provided
00d042e to
50d248c
Compare
Understood. I've kept the changes minimal and dropped the test file as suggested. I can add the tests later once the related PRs are merged. |
Closes #290
Description
Previously, passing multiple
--toarguments with--send_allwould silently drain the wallet to only the first recipient, ignoring the rest. This was inconsistent with the silent-paymentscreate_tx, which already validates the recipient count.Now returns an error unless exactly one recipient is provided.
Notes to the reviewers
create_txbranch of the same file, so behavior is now consistent between the two code paths.Changelog notice
Checklists
All Submissions:
I've signed all my commits
I followed the contribution guidelines
I ran
cargo fmtandcargo clippybefore committingI've updated
CHANGELOG.mdBugfixes: