mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
fix: mint pending get mint info to create auth wallet
This commit is contained in:
@@ -185,6 +185,8 @@ async fn main() -> Result<()> {
|
||||
|
||||
let wallet = builder.build()?;
|
||||
|
||||
wallet.get_mint_info().await?;
|
||||
|
||||
wallets.push(wallet);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -78,6 +78,8 @@ impl MultiMintWallet {
|
||||
target_proof_count,
|
||||
)?;
|
||||
|
||||
wallet.get_mint_info().await?;
|
||||
|
||||
self.add_wallet(wallet.clone()).await;
|
||||
|
||||
Ok(wallet)
|
||||
|
||||
Reference in New Issue
Block a user