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

Handle a missing label activity item #1042

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions mutiny-core/src/nodemanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,13 +973,14 @@ impl<S: MutinyStorage> NodeManager<S> {

let mut activity = vec![];
for inv in label_item.invoices.iter() {
let ln = self.get_invoice_by_hash(inv.payment_hash()).await?;
// Only show paid and in-flight invoices
match ln.status {
HTLCStatus::Succeeded | HTLCStatus::InFlight => {
activity.push(ActivityItem::Lightning(Box::new(ln)));
if let Ok(ln) = self.get_invoice_by_hash(inv.payment_hash()).await {
// Only show paid and in-flight invoices
match ln.status {
HTLCStatus::Succeeded | HTLCStatus::InFlight => {
activity.push(ActivityItem::Lightning(Box::new(ln)));
}
HTLCStatus::Pending | HTLCStatus::Failed => {}
}
HTLCStatus::Pending | HTLCStatus::Failed => {}
}
}
let onchain = self
Expand Down
Loading