Skip to content

Commit

Permalink
Bolt12 networks
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Jan 14, 2024
1 parent d187868 commit 627375a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waila/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ impl PaymentParams<'_> {
PaymentParams::OnChain(address) => Some(address.network),
PaymentParams::Bip21(uri) => Some(uri.address.network),
PaymentParams::Bolt11(invoice) => Some(Network::from(invoice.currency())),
PaymentParams::Bolt12(_) => None, // todo fix after https://github.com/rust-bitcoin/rust-bitcoin/pull/1675
PaymentParams::Bolt12Refund(_) => None, // todo fix after https://github.com/rust-bitcoin/rust-bitcoin/pull/1675
PaymentParams::Bolt12(o) => o.chains().first().cloned().and_then(|c| c.try_into().ok()),
PaymentParams::Bolt12Refund(refund) => refund.chain().try_into().ok(),
PaymentParams::NodePubkey(_) => None,
PaymentParams::LnUrl(_) => None,
PaymentParams::LightningAddress(_) => None,
Expand Down

0 comments on commit 627375a

Please sign in to comment.