Skip to content

Commit b1b9fbd

Browse files
committed
f Avoid Arcing handler if uniffi feature is disabled
1 parent eea1fcd commit b1b9fbd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/lib.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,25 @@ impl Node {
820820
/// Returns a payment handler allowing to create and pay [BOLT 11] invoices.
821821
///
822822
/// [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
823+
#[cfg(not(feature = "uniffi"))]
824+
pub fn bolt11_payment(&self) -> Bolt11PaymentHandler {
825+
Bolt11PaymentHandler::new(
826+
Arc::clone(&self.runtime),
827+
Arc::clone(&self.channel_manager),
828+
Arc::clone(&self.connection_manager),
829+
Arc::clone(&self.keys_manager),
830+
self.liquidity_source.clone(),
831+
Arc::clone(&self.payment_store),
832+
Arc::clone(&self.peer_store),
833+
Arc::clone(&self.config),
834+
Arc::clone(&self.logger),
835+
)
836+
}
837+
838+
/// Returns a payment handler allowing to create and pay [BOLT 11] invoices.
839+
///
840+
/// [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
841+
#[cfg(feature = "uniffi")]
823842
pub fn bolt11_payment(&self) -> Arc<Bolt11PaymentHandler> {
824843
Arc::new(Bolt11PaymentHandler::new(
825844
Arc::clone(&self.runtime),

0 commit comments

Comments
 (0)