Skip to content

Commit 71bfe1f

Browse files
committed
fix: mint pending get mint info to create auth wallet
1 parent d68fdd1 commit 71bfe1f

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

crates/cdk-cli/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ async fn main() -> Result<()> {
185185

186186
let wallet = builder.build()?;
187187

188+
wallet.get_mint_info().await?;
189+
188190
wallets.push(wallet);
189191
}
190192

crates/cdk-cli/src/sub_commands/mint.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,13 @@ pub async fn mint(
4242
{
4343
Some(wallet) => wallet.clone(),
4444
None => {
45+
tracing::debug!("Wallet does not exist creating..");
4546
multi_mint_wallet
4647
.create_and_add_wallet(&mint_url.to_string(), unit, None)
4748
.await?
4849
}
4950
};
5051

51-
wallet.get_mint_info().await?;
52-
5352
let quote_id = match &sub_command_args.quote_id {
5453
None => {
5554
let amount = sub_command_args

crates/cdk/src/wallet/mint.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ impl Wallet {
127127
let mint_quote_response = self.mint_quote_state(&mint_quote.id).await?;
128128

129129
if mint_quote_response.state == MintQuoteState::Paid {
130-
// TODO: Need to pass in keys here
131130
let proofs = self
132131
.mint(&mint_quote.id, SplitTarget::default(), None)
133132
.await?;

crates/cdk/src/wallet/mint_connector/http_client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ impl HttpClient {
132132

133133
/// Get auth token for a protected endpoint
134134
#[cfg(feature = "auth")]
135+
#[instrument(skip(self))]
135136
async fn get_auth_token(
136137
&self,
137138
method: Method,

crates/cdk/src/wallet/multi_mint_wallet.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ impl MultiMintWallet {
7878
target_proof_count,
7979
)?;
8080

81+
wallet.get_mint_info().await?;
82+
8183
self.add_wallet(wallet.clone()).await;
8284

8385
Ok(wallet)

0 commit comments

Comments
 (0)