From 18da5dfe93b8760987a7045f439f0f3b5bc3bdda Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Thu, 13 Aug 2026 06:53:01 +0300 Subject: [PATCH] feat(wallet): sequencers removal added as well --- lez/wallet/src/cli/config.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lez/wallet/src/cli/config.rs b/lez/wallet/src/cli/config.rs index 2ae894785..8b7a192b5 100644 --- a/lez/wallet/src/cli/config.rs +++ b/lez/wallet/src/cli/config.rs @@ -29,6 +29,8 @@ pub enum ConfigSubcommand { user: Option, password: Option, }, + /// Remove sequencer from a list. + RemoveSequencer { addr: String }, } impl ConfigSubcommand { @@ -202,6 +204,21 @@ impl WalletSubcommand for ConfigSubcommand { wallet_core.config.sequencers.push(seq_connection_data); + Ok(SubcommandReturnValue::Empty) + } + Self::RemoveSequencer { addr } => { + let url_addr = addr.parse()?; + + let (idx, _) = wallet_core + .config + .sequencers + .iter() + .enumerate() + .find(|(_, conn_data)| conn_data.sequencer_addr == url_addr) + .ok_or_else(|| anyhow::anyhow!("Sequencer with this addr is not found"))?; + + wallet_core.config.sequencers.remove(idx); + Ok(SubcommandReturnValue::Empty) } }