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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #291 +/- ##
==========================================
- Coverage 10.22% 10.21% -0.02%
==========================================
Files 8 8
Lines 2709 2713 +4
==========================================
Hits 277 277
- Misses 2432 2436 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
ACK 50d248c |
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: