]> Untitled Git - bdk-cli/commitdiff
Merge bitcoindevkit/bdk-cli#291: fix(create_tx): enforce single recipient for send_all master github/master
authormerge-script <withtvpeter@gmail.com>
Mon, 29 Jun 2026 08:51:35 +0000 (09:51 +0100)
committermerge-script <withtvpeter@gmail.com>
Mon, 29 Jun 2026 08:51:35 +0000 (09:51 +0100)
50d248cfc482bf5d7807b84182e7f19b104ab49b fix(create_tx): enforce single recipient for send_all (Artemiy)

Pull request description:

  Closes #290

  ### Description

  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.

  ### Notes to the reviewers

  - The fix mirrors the validation logic already present in the silent-payments `create_tx` branch of the same file, so behavior is now consistent between the two code paths.

  ## Changelog notice
  - Fixed create_tx --send_all to reject multiple recipients instead of silently using only the first one

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  * [x] I've updated `CHANGELOG.md`

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  tvpeter:
    ACK 50d248cfc482bf5d7807b84182e7f19b104ab49b
  va-an:
    ACK 50d248cfc482bf5d7807b84182e7f19b104ab49b

Tree-SHA512: c462aebe4ba046e875f8a9981aef01eb85bc1f24ab122c6c9efb9f4569daf9349f7aefcbe42dad7bb2b144d06bae62da7af7419a392bde19d58980305b6ebaf9

1  2 
src/handlers.rs

diff --cc src/handlers.rs
Simple merge