Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog info is also documented on the [GitHub releases](https://github.com/bi
page. See [DEVELOPMENT_CYCLE.md](DEVELOPMENT_CYCLE.md) for more details.

## [Unreleased]
- Fixed `create_tx --send_all` to reject multiple recipients instead of silently using only the first one

## [3.0.0]

Expand Down
8 changes: 7 additions & 1 deletion src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,13 @@ pub fn handle_offline_wallet_subcommand(
let mut tx_builder = wallet.build_tx();

if send_all {
tx_builder.drain_wallet().drain_to(recipients[0].0.clone());
if recipients.len() == 1 {
tx_builder.drain_wallet().drain_to(recipients[0].0.clone());
} else {
return Err(Error::Generic(
"Wallet can only be drained to a single output".to_string(),
));
}
} else {
let recipients = recipients
.into_iter()
Expand Down