Skip to content

Commit

Permalink
Merge pull request #2180 from mazzi/fix_discord_lowercase_username
Browse files Browse the repository at this point in the history
fix(launchpad): storing Discord lowercase username
  • Loading branch information
RolandSherwin authored Oct 2, 2024
2 parents 6c859ff + 518b10d commit b2dba94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions node-launchpad/src/components/popup/beta_programme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ impl BetaProgramme {
fn capture_inputs(&mut self, key: KeyEvent) -> Vec<Action> {
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),
]
Expand Down
2 changes: 1 addition & 1 deletion node-launchpad/src/components/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit b2dba94

Please sign in to comment.