From caba6978e750946d5803f9a05e2edbdc7869dfd2 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Thu, 25 Sep 2025 16:18:37 +0100 Subject: [PATCH] refactor(cdk): simplify mint addition in MultiMintWallet (#1121) Remove unnecessary mint info fetching and keyset refresh during mint addition, and improve error propagation in token restoration flow --- crates/cdk/src/wallet/multi_mint_wallet.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/cdk/src/wallet/multi_mint_wallet.rs b/crates/cdk/src/wallet/multi_mint_wallet.rs index 6906f04d..ad34a459 100644 --- a/crates/cdk/src/wallet/multi_mint_wallet.rs +++ b/crates/cdk/src/wallet/multi_mint_wallet.rs @@ -205,9 +205,6 @@ impl MultiMintWallet { )? }; - wallet.fetch_mint_info().await?; - wallet.refresh_keysets().await?; - let mut wallets = self.wallets.write().await; wallets.insert(mint_url, wallet); @@ -242,13 +239,7 @@ impl MultiMintWallet { if mint_has_proofs_for_unit { // Add mint to the MultiMintWallet if not already present if !self.has_mint(&mint_url).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() - ); - } + self.add_mint(mint_url.clone(), None).await? } } }