From 484b0dd7e131eee2b739bcb636336e1be5951519 Mon Sep 17 00:00:00 2001 From: ngutech21 Date: Fri, 19 Jan 2024 16:17:45 +0100 Subject: [PATCH] fix: use into() instead of try_into() --- moksha-mint/src/server.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/moksha-mint/src/server.rs b/moksha-mint/src/server.rs index 129e1075..fa2f75aa 100644 --- a/moksha-mint/src/server.rs +++ b/moksha-mint/src/server.rs @@ -571,9 +571,7 @@ async fn post_melt_quote_bolt11( }; mint.db.add_bolt11_melt_quote("e).await?; - Ok(Json(quote.try_into().map_err(|_| { - crate::error::MokshaMintError::InvalidQuote("".to_string()) - })?)) + Ok(Json(quote.into())) } fn quote_expiry() -> u64 { @@ -904,11 +902,7 @@ async fn post_melt_quote_onchain( expiry: quote_onchain_expiry(), paid: false, }; - mint.db.add_onchain_melt_quote("e).await?; - - Ok(Json(quote.try_into().map_err(|_| { - crate::error::MokshaMintError::InvalidQuote("".to_string()) - })?)) + Ok(Json(quote.into())) } #[utoipa::path(