Use different msg for reloading or extending history tx list
After reorg last payments were not removed as the reloading message was handle as an extension of the list. close #1260
This commit is contained in:
parent
e11529be56
commit
1d720d12a4
@ -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>),
|
||||
|
||||
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user