fix: override unpaginated pending events and txs
pending events and txs are passed unpaginated and in full list through PendingTransactions and PendingPayments. It is useless and armful to append to them to an existing list of pending events as a new rbf replacement event should override the previous one and only one of them must be displayed.
This commit is contained in:
parent
2995df870f
commit
18e040e51f
@ -186,11 +186,7 @@ impl State for Home {
|
||||
Err(e) => self.warning = Some(e),
|
||||
Ok(events) => {
|
||||
self.warning = None;
|
||||
for event in events {
|
||||
if !self.pending_events.iter().any(|other| other.tx == event.tx) {
|
||||
self.pending_events.push(event);
|
||||
}
|
||||
}
|
||||
self.pending_events = events;
|
||||
}
|
||||
},
|
||||
Message::View(view::Message::Label(_, _)) | Message::LabelsUpdated(_) => {
|
||||
|
||||
@ -105,11 +105,7 @@ impl State for TransactionsPanel {
|
||||
Err(e) => self.warning = Some(e),
|
||||
Ok(txs) => {
|
||||
self.warning = None;
|
||||
for tx in txs {
|
||||
if !self.pending_txs.iter().any(|other| other.tx == tx.tx) {
|
||||
self.pending_txs.push(tx);
|
||||
}
|
||||
}
|
||||
self.pending_txs = txs;
|
||||
}
|
||||
},
|
||||
Message::RbfModal(tx, is_cancel, res) => match res {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user