Skip to content

Commit 7d18266

Browse files
committed
f Avoid Arcing handler if uniffi feature is disabled
1 parent 4f14432 commit 7d18266

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,24 @@ impl Node {
851851
/// Returns a payment handler allowing to create and pay [BOLT 12] offers and refunds.
852852
///
853853
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
854+
#[cfg(not(feature = "uniffi"))]
855+
pub fn bolt12_payment(&self) -> Arc<Bolt12PaymentHandler> {
856+
Arc::new(Bolt12PaymentHandler::new(
857+
Arc::clone(&self.runtime),
858+
Arc::clone(&self.channel_manager),
859+
Arc::clone(&self.connection_manager),
860+
Arc::clone(&self.keys_manager),
861+
Arc::clone(&self.payment_store),
862+
Arc::clone(&self.peer_store),
863+
Arc::clone(&self.config),
864+
Arc::clone(&self.logger),
865+
))
866+
}
867+
868+
/// Returns a payment handler allowing to create and pay [BOLT 12] offers and refunds.
869+
///
870+
/// [BOLT 12]: https://github.com/lightning/bolts/blob/master/12-offer-encoding.md
871+
#[cfg(feature = "uniffi")]
854872
pub fn bolt12_payment(&self) -> Arc<Bolt12PaymentHandler> {
855873
Arc::new(Bolt12PaymentHandler::new(
856874
Arc::clone(&self.runtime),

0 commit comments

Comments
 (0)