From 20bf7f24f005408d671d0bce185cd2c4e9cdaa99 Mon Sep 17 00:00:00 2001 From: pythcoiner Date: Thu, 20 Mar 2025 12:59:01 +0100 Subject: [PATCH] gui: remove default implem of update_wallet_metadata --- liana-gui/src/daemon/mod.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/liana-gui/src/daemon/mod.rs b/liana-gui/src/daemon/mod.rs index 5a9e9755..6629865f 100644 --- a/liana-gui/src/daemon/mod.rs +++ b/liana-gui/src/daemon/mod.rs @@ -22,7 +22,6 @@ use lianad::{ StartupError, }; -use crate::app::settings::Settings; use crate::{hw::HardwareWalletConfig, node}; #[derive(Debug)] @@ -369,30 +368,9 @@ pub trait Daemon: Debug { /// Reimplemented by LianaLite backend async fn update_wallet_metadata( &self, - fingerprint_aliases: &HashMap, + _fingerprint_aliases: &HashMap, _hws: &[HardwareWalletConfig], ) -> Result<(), DaemonError> { - if let Some(datadir) = self - .config() - .ok_or(DaemonError::Unexpected("Config missing".into()))? - .data_dir() - { - let network = self.get_info().await?.network; - let mut settings = Settings::from_file(datadir, network) - .map_err(|_| DaemonError::Unexpected("Fail to read Settings from file".into()))?; - let wallet = if settings.wallets.len() == 1 { - settings.wallets.get_mut(0).expect("already checked") - } else { - return Err(DaemonError::Unexpected( - "Settings file contains more than one wallet".into(), - )); - }; - for fg in wallet.keys_aliases().keys() { - if fingerprint_aliases.contains_key(fg) { - wallet.update_alias(fg, fingerprint_aliases.get(fg).expect("checked")); - } - } - } Ok(()) } }