Skip to content

Commit

Permalink
Merge #1513: fix reload of selected psbt after update
Browse files Browse the repository at this point in the history
ebc52cc fix reload of selected psbt after update (edouardparis)

Pull request description:

  close #1505

ACKs for top commit:
  edouardparis:
    Self-ACK ebc52cc

Tree-SHA512: d43ec3cfff581f6a0993e12769f2da867a738d25fdb4fb1d12e3265bb8118dfee586b23c6a12469220f83948f7a7bba8d60cad8a0df07100e8835b0a1563b01b
  • Loading branch information
edouardparis committed Jan 6, 2025
2 parents 126fdb7 + ebc52cc commit 77142b5
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 77142b5

Please sign in to comment.