Browse Source

Reload quote for all cases

Cesar Rodas 1 month ago
parent
commit
a93b8c9d51
1 changed files with 8 additions and 10 deletions
  1. 8 10
      crates/cdk/src/mint/ln.rs

+ 8 - 10
crates/cdk/src/mint/ln.rs

@@ -45,18 +45,16 @@ impl Mint {
 
 
         let mut tx = self.localstore.begin_transaction().await?;
         let mut tx = self.localstore.begin_transaction().await?;
 
 
-        if quote.payment_method == PaymentMethod::Bolt11 {
-            // reload the quote, as it state may have changed
-            *quote = tx
-                .get_mint_quote(&quote.id)
-                .await?
-                .ok_or(Error::UnknownQuote)?;
+        // reload the quote, as it state may have changed
+        *quote = tx
+            .get_mint_quote(&quote.id)
+            .await?
+            .ok_or(Error::UnknownQuote)?;
 
 
-            let current_state = quote.state();
+        let current_state = quote.state();
 
 
-            if current_state == MintQuoteState::Issued || current_state == MintQuoteState::Paid {
-                return Ok(());
-            }
+        if current_state == MintQuoteState::Issued || current_state == MintQuoteState::Paid {
+            return Ok(());
         }
         }
 
 
         for payment in ln_status {
         for payment in ln_status {