Merge #1022: gui: sort events and txs after push in the list

ff7e30794b7c79c3aa237dde33f52e716703c434 gui: sort events and txs after push in the list (edouardparis)

Pull request description:

  when a pending tx is confirmed, it is pushed in the HistoryTransaction list at the end. It should be first in the list. We sort now the list in order to make sure it will be always the case.

ACKs for top commit:
  edouardparis:
    Self-ACK ff7e30794b7c79c3aa237dde33f52e716703c434

Tree-SHA512: 06c1c48728b7623605a493442eeaca3319afbb29c90e676f42ecd7d6d90843e69947759b538f0acb1324d3bb8c68029b38a66ddb8536db3291f706a57d16c28c
This commit is contained in:
edouardparis 2024-03-20 13:18:41 +01:00
commit 19d9a4b26a
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F
2 changed files with 2 additions and 0 deletions

View File

@ -180,6 +180,7 @@ impl State for Home {
self.events.push(event);
}
}
self.events.sort_by(|a, b| b.time.cmp(&a.time));
}
},
Message::PendingTransactions(res) => match res {

View File

@ -100,6 +100,7 @@ impl State for TransactionsPanel {
self.txs.push(tx);
}
}
self.txs.sort_by(|a, b| b.time.cmp(&a.time));
}
},
Message::PendingTransactions(res) => match res {