From ffa9c69fee605ef2707b5d443e3d3c35b9160a19 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sat, 12 Oct 2024 13:34:20 +0200 Subject: [PATCH] feat: add logging --- crates/cdk/src/mint/mint_nut04.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/cdk/src/mint/mint_nut04.rs b/crates/cdk/src/mint/mint_nut04.rs index 5809e2d40..334ed313e 100644 --- a/crates/cdk/src/mint/mint_nut04.rs +++ b/crates/cdk/src/mint/mint_nut04.rs @@ -219,6 +219,8 @@ impl Mint { .await? .unwrap(); + let amount_paid = quote.amount_paid + amount; + let quote = MintQuote { id: quote.id, mint_url: quote.mint_url, @@ -228,10 +230,17 @@ impl Mint { state: MintQuoteState::Paid, expiry: quote.expiry, request_lookup_id: quote.request_lookup_id, - amount_paid: quote.amount_paid + amount, + amount_paid, amount_issued: quote.amount_issued, }; + tracing::debug!( + "Quote: {}, Amount paid: {}, amount issued: {}", + quote.id, + amount_paid, + quote.amount_issued + ); + self.localstore.add_mint_quote(quote).await?; } Ok(())