Skip to content

Commit 5dcea20

Browse files
committed
f Avoid Arcing handler if uniffi feature is disabled
1 parent f786cd1 commit 5dcea20

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,20 @@ impl Node {
849849
}
850850

851851
/// Returns a payment handler allowing to send spontaneous ("keysend") payments.
852+
#[cfg(not(feature = "uniffi"))]
853+
pub fn spontaneous_payment(&self) -> SpontaneousPaymentHandler {
854+
SpontaneousPaymentHandler::new(
855+
Arc::clone(&self.runtime),
856+
Arc::clone(&self.channel_manager),
857+
Arc::clone(&self.keys_manager),
858+
Arc::clone(&self.payment_store),
859+
Arc::clone(&self.config),
860+
Arc::clone(&self.logger),
861+
)
862+
}
863+
864+
/// Returns a payment handler allowing to send spontaneous ("keysend") payments.
865+
#[cfg(feature = "uniffi")]
852866
pub fn spontaneous_payment(&self) -> Arc<SpontaneousPaymentHandler> {
853867
Arc::new(SpontaneousPaymentHandler::new(
854868
Arc::clone(&self.runtime),

0 commit comments

Comments
 (0)