Skip to content

Commit

Permalink
fix: use into() instead of try_into()
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Jan 19, 2024
1 parent 5284dec commit 484b0dd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions moksha-mint/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,7 @@ async fn post_melt_quote_bolt11(
};
mint.db.add_bolt11_melt_quote(&quote).await?;

Ok(Json(quote.try_into().map_err(|_| {
crate::error::MokshaMintError::InvalidQuote("".to_string())
})?))
Ok(Json(quote.into()))
}

fn quote_expiry() -> u64 {
Expand Down Expand Up @@ -904,11 +902,7 @@ async fn post_melt_quote_onchain(
expiry: quote_onchain_expiry(),
paid: false,
};
mint.db.add_onchain_melt_quote(&quote).await?;

Ok(Json(quote.try_into().map_err(|_| {
crate::error::MokshaMintError::InvalidQuote("".to_string())
})?))
Ok(Json(quote.into()))
}

Check warning on line 906 in moksha-mint/src/server.rs

View check run for this annotation

Codecov / codecov/patch

moksha-mint/src/server.rs#L890-L906

Added lines #L890 - L906 were not covered by tests

#[utoipa::path(
Expand Down

0 comments on commit 484b0dd

Please sign in to comment.