Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 9de8039

Browse files
committed
Handle a missing label activity item
1 parent 949b856 commit 9de8039

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

mutiny-core/src/nodemanager.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -973,13 +973,14 @@ impl<S: MutinyStorage> NodeManager<S> {
973973

974974
let mut activity = vec![];
975975
for inv in label_item.invoices.iter() {
976-
let ln = self.get_invoice_by_hash(inv.payment_hash()).await?;
977-
// Only show paid and in-flight invoices
978-
match ln.status {
979-
HTLCStatus::Succeeded | HTLCStatus::InFlight => {
980-
activity.push(ActivityItem::Lightning(Box::new(ln)));
976+
if let Ok(ln) = self.get_invoice_by_hash(inv.payment_hash()).await {
977+
// Only show paid and in-flight invoices
978+
match ln.status {
979+
HTLCStatus::Succeeded | HTLCStatus::InFlight => {
980+
activity.push(ActivityItem::Lightning(Box::new(ln)));
981+
}
982+
HTLCStatus::Pending | HTLCStatus::Failed => {}
981983
}
982-
HTLCStatus::Pending | HTLCStatus::Failed => {}
983984
}
984985
}
985986
let onchain = self

0 commit comments

Comments
 (0)