gui: TransactionPanel.update() -> update label if tx already exists

This commit is contained in:
pythcoiner 2024-07-18 14:33:46 +02:00
parent 0a7ff2b0ea
commit fdf01cc095

View File

@ -99,7 +99,9 @@ impl State for TransactionsPanel {
Ok(txs) => {
self.warning = None;
for tx in txs {
if !self.txs.iter().any(|other| other.tx == tx.tx) {
if let Some(t) = self.txs.iter_mut().find(|other| other.tx == tx.tx) {
t.labels = tx.labels;
} else {
self.txs.push(tx);
}
}