From: Mshehu5 Date: Sat, 6 Jun 2026 11:24:36 +0000 (+0100) Subject: Restrict payjoin inputs to confirmed UTXOs X-Git-Url: http://internal-gitweb-vhost/blockdata/script/encode/-script/display/struct.CommandString.html?a=commitdiff_plain;h=6fb0ecd00e089a8cd2d8eecf46e8f6ac48dc4033;p=bdk-cli Restrict payjoin inputs to confirmed UTXOs Prevent wallet failures caused by selecting unconfirmed coins for payjoin inputs. Without this filter, the wallet can fail with an "unconfirmed coins" error during payjoin processing. --- diff --git a/src/payjoin/mod.rs b/src/payjoin/mod.rs index 20410b3..e811213 100644 --- a/src/payjoin/mod.rs +++ b/src/payjoin/mod.rs @@ -548,6 +548,7 @@ impl<'a> PayjoinManager<'a> { let candidate_inputs: Vec = self .wallet .list_unspent() + .filter(|output| output.chain_position.is_confirmed()) .map(|output| { let psbtin = self .wallet