Skip to content

Commit

Permalink
fix: merge Taproot sigs when updating PSBT
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Jan 6, 2025
1 parent 1cde178 commit 86e30d2
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions liana-gui/src/app/state/psbt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86e30d2

Please sign in to comment.