feat: lnbits ln backend

fix: check webhook url is valid
This commit is contained in:
thesimplekid
2024-08-27 14:05:02 +03:00
parent 95dbd18c9a
commit 5e5345074d
10 changed files with 383 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
//! Error for Strike ln backend
use thiserror::Error;
/// Strike Error
#[derive(Debug, Error)]
pub enum Error {
/// Invoice amount not defined
#[error("Unknown invoice amount")]
UnknownInvoiceAmount,
/// Unknown invoice
#[error("Unknown invoice")]
UnknownInvoice,
/// Anyhow error
#[error(transparent)]
Anyhow(#[from] anyhow::Error),
}
impl From<Error> for cdk::cdk_lightning::Error {
fn from(e: Error) -> Self {
Self::Lightning(Box::new(e))
}
}