Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* return all matching tx entries from retrieve_txs

* rustfmt
  • Loading branch information
yeastplume authored Dec 17, 2018
1 parent ea1c3a9 commit fcec70d
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions wallet/src/libwallet/internal/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,12 @@ where
{
// just read the wallet here, no need for a write lock
let mut txs = if let Some(id) = tx_id {
let tx = wallet.tx_log_iter().find(|t| t.id == id);
if let Some(t) = tx {
vec![t]
} else {
vec![]
}
wallet.tx_log_iter().filter(|t| t.id == id).collect()
} else if tx_slate_id.is_some() {
let tx = wallet.tx_log_iter().find(|t| t.tx_slate_id == tx_slate_id);
if let Some(t) = tx {
vec![t]
} else {
vec![]
}
wallet
.tx_log_iter()
.filter(|t| t.tx_slate_id == tx_slate_id)
.collect()
} else {
wallet.tx_log_iter().collect::<Vec<_>>()
};
Expand Down

0 comments on commit fcec70d

Please sign in to comment.