diff --git a/crates/cdk-lnbits/Cargo.toml b/crates/cdk-lnbits/Cargo.toml index 4eca14a6..5b20886f 100644 --- a/crates/cdk-lnbits/Cargo.toml +++ b/crates/cdk-lnbits/Cargo.toml @@ -21,5 +21,5 @@ tokio.workspace = true tokio-util.workspace = true tracing.workspace = true thiserror.workspace = true -lnbits-rs = "0.4.0" +lnbits-rs = "0.5.0" serde_json.workspace = true diff --git a/crates/cdk-lnbits/src/lib.rs b/crates/cdk-lnbits/src/lib.rs index 9d0562b5..35a9486a 100644 --- a/crates/cdk-lnbits/src/lib.rs +++ b/crates/cdk-lnbits/src/lib.rs @@ -276,7 +276,10 @@ impl MintPayment for LNbits { Self::Err::Anyhow(anyhow!("Could not create invoice")) })?; - let request: Bolt11Invoice = create_invoice_response.payment_request.parse()?; + let request: Bolt11Invoice = create_invoice_response + .bolt11() + .ok_or_else(|| Self::Err::Anyhow(anyhow!("Missing bolt11 invoice")))? + .parse()?; let expiry = request.expires_at().map(|t| t.as_secs()); Ok(CreateIncomingPaymentResponse {