فهرست منبع

Merge pull request #553 from thesimplekid/lnd_unwrap

chore: remove unwrap from lnd wait invoice
thesimplekid 2 ماه پیش
والد
کامیت
7aa83bfbf7
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      crates/cdk-lnd/src/lib.rs

+ 4 - 1
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();