Skip to content

Commit 71226d5

Browse files
committed
f - Use find_all_extract for route_hints
1 parent a283736 commit 71226d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning-invoice/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,9 @@ impl Invoice {
11691169

11701170
/// Returns a list of all routes included in the invoice as the underlying hints
11711171
pub fn route_hints(&self) -> Vec<&RouteHint> {
1172-
self.private_routes().into_iter().map(|route| &**route).collect()
1172+
find_all_extract!(
1173+
self.signed_invoice.known_tagged_fields(), TaggedField::PrivateRoute(ref x), x
1174+
).map(|route| &**route).collect()
11731175
}
11741176

11751177
/// Returns the currency for which the invoice was issued

0 commit comments

Comments
 (0)