From 60e87cb6308e67040ebc68ae687d6e2b19d76e33 Mon Sep 17 00:00:00 2001 From: ok300 <106775972+ok300@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:42:07 +0200 Subject: [PATCH] cdk-mintd: fix imports for starting mint with swagger feature --- crates/cdk-axum/src/lib.rs | 3 +++ crates/cdk-mintd/src/main.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/cdk-axum/src/lib.rs b/crates/cdk-axum/src/lib.rs index 3095507a..9083163b 100644 --- a/crates/cdk-axum/src/lib.rs +++ b/crates/cdk-axum/src/lib.rs @@ -45,6 +45,9 @@ mod swagger_imports { pub use cdk::nuts::{MeltQuoteState, MintQuoteState}; } +#[cfg(feature = "swagger")] +use swagger_imports::*; + /// CDK Mint State #[derive(Clone)] pub struct MintState { diff --git a/crates/cdk-mintd/src/main.rs b/crates/cdk-mintd/src/main.rs index 6f3c4c9f..5a48596c 100644 --- a/crates/cdk-mintd/src/main.rs +++ b/crates/cdk-mintd/src/main.rs @@ -36,6 +36,8 @@ use tokio::sync::{Mutex, Notify}; use tower_http::cors::CorsLayer; use tracing_subscriber::EnvFilter; use url::Url; +#[cfg(feature = "swagger")] +use utoipa::OpenApi; mod cli; mod config; @@ -451,7 +453,7 @@ async fn main() -> anyhow::Result<()> { // Checks the status of all pending melt quotes // Pending melt quotes where the payment has gone through inputs are burnt - // Pending melt quotes where the paynment has **failed** inputs are reset to unspent + // Pending melt quotes where the payment has **failed** inputs are reset to unspent check_pending_melt_quotes(Arc::clone(&mint), &ln_backends).await?; let listen_addr = settings.info.listen_host;