We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0566aca commit a9babceCopy full SHA for a9babce
lightning/src/offers/offer.rs
@@ -53,13 +53,13 @@ pub(crate) struct OfferContents {
53
}
54
55
impl Offer {
56
+ // TODO: Return a slice once ChainHash has constants.
57
/// The chain used for paying the invoice.
- pub fn chain(&self) -> ChainHash {
58
- // TODO: Update once spec is finalized
+ pub fn chains(&self) -> Vec<ChainHash> {
59
self.contents.chains
60
.as_ref()
61
- .and_then(|chains| chains.first().copied())
62
- .unwrap_or_else(|| ChainHash::using_genesis_block(Network::Bitcoin))
+ .cloned()
+ .unwrap_or_else(|| vec![ChainHash::using_genesis_block(Network::Bitcoin)])
63
64
65
/// Metadata set by the originator. Useful for authentication and validating fields.
0 commit comments