Skip to content

Commit 76a8cc6

Browse files
committed
docs(wallet): fix misleading RBF comment in create_tx
- Replace incorrect RBF example with sweeping UTXOs - Reorder comment items to match the code's condition order
1 parent fb7681a commit 76a8cc6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,10 +1492,10 @@ impl Wallet {
14921492

14931493
if tx.output.is_empty() {
14941494
// Uh oh, our transaction has no outputs.
1495-
// We allow this when:
1496-
// - We have a drain_to address and the utxos we must spend (this happens,
1497-
// for example, when we RBF).
1498-
// - We have a drain_to address and drain_wallet set.
1495+
// We allow this when we have a `drain_to` address and either:
1496+
// - `drain_wallet` is enabled
1497+
// - there are UTXOs we must spend (this happens, for example, when
1498+
// sweeping specific UTXOs to a given address)
14991499
// Otherwise, we don't know who we should send the funds to, and how much
15001500
// we should send!
15011501
if params.drain_to.is_some() && (params.drain_wallet || !params.utxos.is_empty()) {

0 commit comments

Comments
 (0)