Skip to content

Commit

Permalink
f Avoid Arcing handler if uniffi feature is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Mar 8, 2024
1 parent 5006e3b commit ca8b3d6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,24 @@ impl Node {
/// Returns a payment handler allowing to create and pay [BOLT 12] offers and refunds.
///
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
#[cfg(not(feature = "uniffi"))]
pub fn bolt12_payment(&self) -> Arc<Bolt12PaymentHandler> {
Arc::new(Bolt12PaymentHandler::new(
Arc::clone(&self.runtime),
Arc::clone(&self.channel_manager),
Arc::clone(&self.connection_manager),
Arc::clone(&self.keys_manager),
Arc::clone(&self.payment_store),
Arc::clone(&self.peer_store),
Arc::clone(&self.config),
Arc::clone(&self.logger),
))
}

/// Returns a payment handler allowing to create and pay [BOLT 12] offers and refunds.
///
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
#[cfg(feature = "uniffi")]
pub fn bolt12_payment(&self) -> Arc<Bolt12PaymentHandler> {
Arc::new(Bolt12PaymentHandler::new(
Arc::clone(&self.runtime),
Expand Down

0 comments on commit ca8b3d6

Please sign in to comment.