From 86e30d2d839462fc063702e3f4430656073a6aa2 Mon Sep 17 00:00:00 2001 From: Michael Mallan Date: Mon, 6 Jan 2025 15:46:14 +0000 Subject: [PATCH] fix: merge Taproot sigs when updating PSBT --- liana-gui/src/app/state/psbt.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/liana-gui/src/app/state/psbt.rs b/liana-gui/src/app/state/psbt.rs index bfa1ccf3..ed0907fd 100644 --- a/liana-gui/src/app/state/psbt.rs +++ b/liana-gui/src/app/state/psbt.rs @@ -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