Skip to content

Commit

Permalink
Remove unnecessary expiry check
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcaseria committed Oct 25, 2024
1 parent 2651582 commit 00cf543
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/cdk/src/mint/mint_nut04.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,9 @@ impl Mint {
&self,
mint_request: nut04::MintBolt11Request,
) -> Result<nut04::MintBolt11Response, Error> {
// Check quote is known and not expired
// Check quote is known
match self.localstore.get_mint_quote(&mint_request.quote).await? {
Some(quote) => {
if quote.expiry < unix_time() {
return Err(Error::ExpiredQuote(quote.expiry, unix_time()));
}
}
Some(_) => (),
None => {
return Err(Error::UnknownQuote);
}
Expand Down

0 comments on commit 00cf543

Please sign in to comment.