mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-10 07:36:13 +01:00
fix(cdk): improve error handling when adding mint to MultiMintWallet (#1099)
Add proper error handling and logging for add_mint operation instead of propagating errors, preventing wallet operations from failing completely when a mint cannot be added.
This commit is contained in:
@@ -242,7 +242,13 @@ impl MultiMintWallet {
|
||||
if mint_has_proofs_for_unit {
|
||||
// Add mint to the MultiMintWallet if not already present
|
||||
if !self.has_mint(&mint_url).await {
|
||||
self.add_mint(mint_url, None).await?;
|
||||
if let Err(err) = self.add_mint(mint_url.clone(), None).await {
|
||||
tracing::error!(
|
||||
"Could not add {} to wallet {}.",
|
||||
mint_url,
|
||||
err.to_string()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user