소스 검색

Merge pull request #964 from gudnuf/fix/bolt12-internal-settlment

fix: allow paid and issued bolt12 quotes to settle internally
thesimplekid 2 달 전
부모
커밋
28ef002c34
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      crates/cdk/src/mint/mod.rs

+ 3 - 2
crates/cdk/src/mint/mod.rs

@@ -703,8 +703,9 @@ impl Mint {
         };
 
         // Mint quote has already been settled, proofs should not be burned or held.
-        if mint_quote.state() == MintQuoteState::Issued
-            || mint_quote.state() == MintQuoteState::Paid
+        if (mint_quote.state() == MintQuoteState::Issued
+            || mint_quote.state() == MintQuoteState::Paid)
+            && mint_quote.payment_method == PaymentMethod::Bolt11
         {
             return Err(Error::RequestAlreadyPaid);
         }