Merge #1263: Use different msg for reloading or extending history tx list

1d720d12a48be082668570a0448a9e3fafcf230c Use different msg for reloading or extending history tx list (edouardparis)

Pull request description:

  After reorg last payments were not removed as the reloading message was handle as an extension of the list.

  close #1260

ACKs for top commit:
  pythcoiner:
    ACK 1d720d12a48be082668570a0448a9e3fafcf230c tested w/ bitcoind backend

Tree-SHA512: 8cdb68cec969bbc187e254e05f29a847e26cf6ba198f11c8d11ddccc64f19b3b38a8d4f3dff30eb60cf7779df378ed241986bc50daba8bfb11b9c22b2139b846
This commit is contained in:
edouardparis 2024-09-05 10:48:41 +02:00
commit 360aac5a4f
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F
2 changed files with 9 additions and 1 deletions

View File

@ -39,6 +39,7 @@ pub enum Message {
Verified(Fingerprint, Result<(), Error>),
StartRescan(Result<(), Error>),
HardwareWallets(HardwareWalletMessage),
HistoryTransactionsExtension(Result<Vec<HistoryTransaction>, Error>),
HistoryTransactions(Result<Vec<HistoryTransaction>, Error>),
PendingTransactions(Result<Vec<HistoryTransaction>, Error>),
LabelsUpdated(Result<HashMap<String, Option<String>>, Error>),

View File

@ -180,6 +180,13 @@ impl State for Home {
}
},
Message::HistoryTransactions(res) => match res {
Err(e) => self.warning = Some(e),
Ok(events) => {
self.warning = None;
self.events = events;
}
},
Message::HistoryTransactionsExtension(res) => match res {
Err(e) => self.warning = Some(e),
Ok(events) => {
self.warning = None;
@ -259,7 +266,7 @@ impl State for Home {
}
Ok(events)
},
Message::HistoryTransactions,
Message::HistoryTransactionsExtension,
);
}
}