From fe810db369d36184b46ff436303122e08b349bdc Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Wed, 30 Oct 2024 15:07:03 +0000 Subject: [PATCH] feat: return error for lnd bolt12 --- .pre-commit-config.yaml | 2 +- crates/cdk-lnd/src/error.rs | 3 +++ crates/cdk-lnd/src/lib.rs | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4ae781c07..2940f54dc 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/hjc1qcdcir47vpjxds5sdiiw1sw1n36q-pre-commit-config.json \ No newline at end of file +/nix/store/wrmdlcghh24lbnjwh0r42nwm54abdzsq-pre-commit-config.json \ No newline at end of file diff --git a/crates/cdk-lnd/src/error.rs b/crates/cdk-lnd/src/error.rs index 8d7d7fda6..3c62d6093 100644 --- a/crates/cdk-lnd/src/error.rs +++ b/crates/cdk-lnd/src/error.rs @@ -20,6 +20,9 @@ pub enum Error { /// Payment failed #[error("LND payment failed")] PaymentFailed, + /// Unsupported method + #[error("Unsupported method")] + UnsupportedMethod, /// Wrong invoice type #[error("Wrong invoice type")] WrongRequestType, diff --git a/crates/cdk-lnd/src/lib.rs b/crates/cdk-lnd/src/lib.rs index cd4167d40..7f1fcf836 100644 --- a/crates/cdk-lnd/src/lib.rs +++ b/crates/cdk-lnd/src/lib.rs @@ -403,7 +403,7 @@ impl MintLightning for Lnd { &self, _melt_quote_request: &MeltQuoteBolt12Request, ) -> Result { - todo!() + Err(Error::UnsupportedMethod.into()) } /// Pay a bolt12 offer @@ -413,7 +413,7 @@ impl MintLightning for Lnd { _amount: Option, _max_fee_amount: Option, ) -> Result { - todo!() + Err(Error::UnsupportedMethod.into()) } /// Create bolt12 offer @@ -425,6 +425,6 @@ impl MintLightning for Lnd { _unix_expiry: u64, _single_use: bool, ) -> Result { - todo!() + Err(Error::UnsupportedMethod.into()) } }