Skip to content

Commit

Permalink
fix reload of selected psbt after update
Browse files Browse the repository at this point in the history
close #1505
  • Loading branch information
edouardparis committed Jan 3, 2025
1 parent 2e7fe80 commit ebc52cc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions liana-gui/src/app/state/psbts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ impl State for PsbtsPanel {
Ok(txs) => {
self.warning = None;
self.spend_txs = txs;
if let Some(tx) = &self.selected_tx {
if let Some(tx) = self.spend_txs.iter().find(|spend_tx| {
spend_tx.psbt.unsigned_tx.txid() == tx.tx.psbt.unsigned_tx.txid()
}) {
let tx = psbt::PsbtState::new(self.wallet.clone(), tx.clone(), true);
let cmd = tx.load(daemon);
self.selected_tx = Some(tx);
return cmd;
}
}
}
},
Message::View(view::Message::ImportSpend(view::ImportSpendMessage::Import)) => {
Expand Down

0 comments on commit ebc52cc

Please sign in to comment.