Skip to content

Commit a9babce

Browse files
committed
f - return all the chain hash
1 parent 0566aca commit a9babce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/offers/offer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ pub(crate) struct OfferContents {
5353
}
5454

5555
impl Offer {
56+
// TODO: Return a slice once ChainHash has constants.
5657
/// The chain used for paying the invoice.
57-
pub fn chain(&self) -> ChainHash {
58-
// TODO: Update once spec is finalized
58+
pub fn chains(&self) -> Vec<ChainHash> {
5959
self.contents.chains
6060
.as_ref()
61-
.and_then(|chains| chains.first().copied())
62-
.unwrap_or_else(|| ChainHash::using_genesis_block(Network::Bitcoin))
61+
.cloned()
62+
.unwrap_or_else(|| vec![ChainHash::using_genesis_block(Network::Bitcoin)])
6363
}
6464

6565
/// Metadata set by the originator. Useful for authentication and validating fields.

0 commit comments

Comments
 (0)