update lnbits-rs to 0.5.0

This commit is contained in:
Darrell
2025-04-23 16:44:59 +09:00
parent 15e10c0e90
commit bac711d9fd
2 changed files with 5 additions and 2 deletions

View File

@@ -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 {