diff --git a/crates/cdk-cli/src/main.rs b/crates/cdk-cli/src/main.rs index 64290add..2c110dbc 100644 --- a/crates/cdk-cli/src/main.rs +++ b/crates/cdk-cli/src/main.rs @@ -185,6 +185,8 @@ async fn main() -> Result<()> { let wallet = builder.build()?; + wallet.get_mint_info().await?; + wallets.push(wallet); } diff --git a/crates/cdk-cli/src/sub_commands/mint.rs b/crates/cdk-cli/src/sub_commands/mint.rs index b7976b74..aa1cdc91 100644 --- a/crates/cdk-cli/src/sub_commands/mint.rs +++ b/crates/cdk-cli/src/sub_commands/mint.rs @@ -42,14 +42,13 @@ pub async fn mint( { Some(wallet) => wallet.clone(), None => { + tracing::debug!("Wallet does not exist creating.."); multi_mint_wallet .create_and_add_wallet(&mint_url.to_string(), unit, None) .await? } }; - wallet.get_mint_info().await?; - let quote_id = match &sub_command_args.quote_id { None => { let amount = sub_command_args diff --git a/crates/cdk/src/wallet/mint.rs b/crates/cdk/src/wallet/mint.rs index 81815df1..d13de560 100644 --- a/crates/cdk/src/wallet/mint.rs +++ b/crates/cdk/src/wallet/mint.rs @@ -127,7 +127,6 @@ impl Wallet { let mint_quote_response = self.mint_quote_state(&mint_quote.id).await?; if mint_quote_response.state == MintQuoteState::Paid { - // TODO: Need to pass in keys here let proofs = self .mint(&mint_quote.id, SplitTarget::default(), None) .await?; diff --git a/crates/cdk/src/wallet/mint_connector/http_client.rs b/crates/cdk/src/wallet/mint_connector/http_client.rs index b7a4f199..e9baf4a2 100644 --- a/crates/cdk/src/wallet/mint_connector/http_client.rs +++ b/crates/cdk/src/wallet/mint_connector/http_client.rs @@ -132,6 +132,7 @@ impl HttpClient { /// Get auth token for a protected endpoint #[cfg(feature = "auth")] + #[instrument(skip(self))] async fn get_auth_token( &self, method: Method, diff --git a/crates/cdk/src/wallet/multi_mint_wallet.rs b/crates/cdk/src/wallet/multi_mint_wallet.rs index a83d7e3f..eab97c3f 100644 --- a/crates/cdk/src/wallet/multi_mint_wallet.rs +++ b/crates/cdk/src/wallet/multi_mint_wallet.rs @@ -78,6 +78,8 @@ impl MultiMintWallet { target_proof_count, )?; + wallet.get_mint_info().await?; + self.add_wallet(wallet.clone()).await; Ok(wallet)