fix: merge Taproot sigs when updating PSBT

This commit is contained in:
Michael Mallan 2025-01-06 15:46:14 +00:00
parent 1cde178abe
commit 86e30d2d83
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -692,27 +692,7 @@ impl Action for UpdateAction {
self.success = true;
self.error = None;
let psbt = Psbt::from_str(&self.updated.value).expect("Already checked");
for (i, input) in tx.psbt.inputs.iter_mut().enumerate() {
if tx
.psbt
.unsigned_tx
.input
.get(i)
.map(|tx_in| tx_in.previous_output)
!= psbt
.unsigned_tx
.input
.get(i)
.map(|tx_in| tx_in.previous_output)
{
continue;
}
if let Some(updated_input) = psbt.inputs.get(i) {
input
.partial_sigs
.extend(updated_input.partial_sigs.clone().into_iter());
}
}
merge_signatures(&mut tx.psbt, &psbt);
tx.sigs = self
.wallet
.main_descriptor