From 7b7d7ce9467d7c21122838e67e09f6d94f49333c Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Wed, 22 Jan 2025 13:51:26 +0000 Subject: [PATCH] chore: remove unwrap from lnd wait invoice --- crates/cdk-lnd/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/cdk-lnd/src/lib.rs b/crates/cdk-lnd/src/lib.rs index 03e45170..04888e1a 100644 --- a/crates/cdk-lnd/src/lib.rs +++ b/crates/cdk-lnd/src/lib.rs @@ -108,7 +108,10 @@ impl MintLightning for Lnd { .lightning() .subscribe_invoices(stream_req) .await - .unwrap() + .map_err(|_err| { + tracing::error!("Could not subscribe to invoice"); + Error::Connection + })? .into_inner(); let cancel_token = self.wait_invoice_cancel_token.clone();