From fd23e269ff388a3af1999cc555b173ceea23bbd4 Mon Sep 17 00:00:00 2001 From: Lautaro Mazzitelli Date: Wed, 2 Oct 2024 12:59:06 +0200 Subject: [PATCH 1/2] fix(launchpad): we change discord username to lowercase --- node-launchpad/src/components/popup/beta_programme.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/node-launchpad/src/components/popup/beta_programme.rs b/node-launchpad/src/components/popup/beta_programme.rs index 8f0a547fe9..615c20bcf4 100644 --- a/node-launchpad/src/components/popup/beta_programme.rs +++ b/node-launchpad/src/components/popup/beta_programme.rs @@ -58,14 +58,15 @@ impl BetaProgramme { fn capture_inputs(&mut self, key: KeyEvent) -> Vec { let send_back = match key.code { KeyCode::Enter => { - let username = self.discord_input_filed.value().to_string(); + let username = self.discord_input_filed.value().to_string().to_lowercase(); + self.discord_input_filed = username.clone().into(); debug!( "Got Enter, saving the discord username {username:?} and switching to DiscordIdAlreadySet, and Home Scene", ); self.state = BetaProgrammeState::DiscordIdAlreadySet; vec![ - Action::StoreDiscordUserName(self.discord_input_filed.value().to_string()), + Action::StoreDiscordUserName(username.clone()), Action::OptionsActions(OptionsActions::UpdateBetaProgrammeUsername(username)), Action::SwitchScene(Scene::Status), ] From c1c3be33da39ef56959f92859e590ff9df98bd35 Mon Sep 17 00:00:00 2001 From: Lautaro Mazzitelli Date: Wed, 2 Oct 2024 12:59:33 +0200 Subject: [PATCH 2/2] chore(launchpad): we reset but do not start nodes after username change --- node-launchpad/src/components/status.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index 7d31f1fc92..43e0970782 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -299,7 +299,7 @@ impl Component for Status { self.lock_registry = Some(LockRegistryState::ResettingNodes); info!("Resetting safenode services because the Discord Username was reset."); let action_sender = self.get_actions_sender()?; - reset_nodes(action_sender, true); + reset_nodes(action_sender, false); } } Action::StoreStorageDrive(ref drive_mountpoint, ref _drive_name) => {