diff --git a/node-launchpad/.config/config.json5 b/node-launchpad/.config/config.json5 index 049f9de82b..c630bfdc7f 100644 --- a/node-launchpad/.config/config.json5 +++ b/node-launchpad/.config/config.json5 @@ -14,9 +14,9 @@ "": {"StatusActions":"StopNodes"}, "": {"StatusActions":"StopNodes"}, "": {"StatusActions":"StopNodes"}, - "": {"StatusActions":"TriggerBetaProgramme"}, - "": {"StatusActions":"TriggerBetaProgramme"}, - "": {"StatusActions":"TriggerBetaProgramme"}, + "": {"StatusActions":"TriggerRewardsAddress"}, + "": {"StatusActions":"TriggerRewardsAddress"}, + "": {"StatusActions":"TriggerRewardsAddress"}, "up" : {"StatusActions":"PreviousTableItem"}, "down": {"StatusActions":"NextTableItem"}, @@ -48,9 +48,9 @@ "": {"OptionsActions":"TriggerChangePortRange"}, "": {"OptionsActions":"TriggerChangePortRange"}, "": {"OptionsActions":"TriggerChangePortRange"}, - "": {"OptionsActions":"TriggerBetaProgramme"}, - "": {"OptionsActions":"TriggerBetaProgramme"}, - "": {"OptionsActions":"TriggerBetaProgramme"}, + "": {"OptionsActions":"TriggerRewardsAddress"}, + "": {"OptionsActions":"TriggerRewardsAddress"}, + "": {"OptionsActions":"TriggerRewardsAddress"}, "": {"OptionsActions":"TriggerAccessLogs"}, "": {"OptionsActions":"TriggerAccessLogs"}, "": {"OptionsActions":"TriggerAccessLogs"}, diff --git a/node-launchpad/src/action.rs b/node-launchpad/src/action.rs index 37a0226323..60c6cd618d 100644 --- a/node-launchpad/src/action.rs +++ b/node-launchpad/src/action.rs @@ -26,7 +26,7 @@ pub enum Action { StoreStorageDrive(PathBuf, String), StoreConnectionMode(ConnectionMode), StorePortRange(u32, u32), - StoreDiscordUserName(String), + StoreRewardsAddress(String), StoreNodesToStart(usize), Tick, @@ -58,7 +58,7 @@ pub enum StatusActions { NodesStatsObtained(NodeStats), TriggerManageNodes, - TriggerBetaProgramme, + TriggerRewardsAddress, PreviousTableItem, NextTableItem, @@ -71,11 +71,11 @@ pub enum OptionsActions { TriggerChangeDrive, TriggerChangeConnectionMode, TriggerChangePortRange, - TriggerBetaProgramme, + TriggerRewardsAddress, TriggerResetNodes, TriggerAccessLogs, UpdateConnectionMode(ConnectionMode), UpdatePortRange(u32, u32), - UpdateBetaProgrammeUsername(String), + UpdateRewardsAddress(String), UpdateStorageDrive(PathBuf, String), } diff --git a/node-launchpad/src/app.rs b/node-launchpad/src/app.rs index e8531ab825..7c191b1abe 100644 --- a/node-launchpad/src/app.rs +++ b/node-launchpad/src/app.rs @@ -14,9 +14,9 @@ use crate::{ help::Help, options::Options, popup::{ - beta_programme::BetaProgramme, change_drive::ChangeDrivePopup, - connection_mode::ChangeConnectionModePopUp, manage_nodes::ManageNodes, - port_range::PortRangePopUp, reset_nodes::ResetNodesPopup, + change_drive::ChangeDrivePopup, connection_mode::ChangeConnectionModePopUp, + manage_nodes::ManageNodes, port_range::PortRangePopUp, reset_nodes::ResetNodesPopup, + rewards_address::RewardsAddress, }, status::{Status, StatusConfig}, Component, @@ -91,7 +91,7 @@ impl App { // Main Screens let status_config = StatusConfig { allocated_disk_space: app_data.nodes_to_start, - discord_username: app_data.discord_username.clone(), + rewards_address: app_data.discord_username.clone(), peers_args, safenode_path, data_dir_path, @@ -119,7 +119,7 @@ impl App { ChangeDrivePopup::new(storage_mountpoint.clone(), app_data.nodes_to_start)?; let change_connection_mode = ChangeConnectionModePopUp::new(connection_mode)?; let port_range = PortRangePopUp::new(connection_mode, port_from, port_to); - let beta_programme = BetaProgramme::new(app_data.discord_username.clone()); + let rewards_address = RewardsAddress::new(app_data.discord_username.clone()); Ok(Self { config, @@ -143,7 +143,7 @@ impl App { Box::new(change_drive), Box::new(change_connection_mode), Box::new(port_range), - Box::new(beta_programme), + Box::new(rewards_address), Box::new(reset_nodes), Box::new(manage_nodes), ], @@ -276,9 +276,9 @@ impl App { self.app_data.port_to = Some(*to); self.app_data.save(None)?; } - Action::StoreDiscordUserName(ref username) => { - debug!("Storing discord username: {username:?}"); - self.app_data.discord_username.clone_from(username); + Action::StoreRewardsAddress(ref rewards_address) => { + debug!("Storing rewards address: {rewards_address:?}"); + self.app_data.discord_username.clone_from(rewards_address); self.app_data.save(None)?; } Action::StoreNodesToStart(ref count) => { diff --git a/node-launchpad/src/components/options.rs b/node-launchpad/src/components/options.rs index 934578f93e..a631d41b5e 100644 --- a/node-launchpad/src/components/options.rs +++ b/node-launchpad/src/components/options.rs @@ -28,7 +28,7 @@ use sn_node_manager::config::get_service_log_dir_path; pub struct Options { pub storage_mountpoint: PathBuf, pub storage_drive: String, - pub discord_username: String, + pub rewards_address: String, pub connection_mode: ConnectionMode, pub port_edit: bool, pub port_from: Option, @@ -41,7 +41,7 @@ impl Options { pub async fn new( storage_mountpoint: PathBuf, storage_drive: String, - discord_username: String, + rewards_address: String, connection_mode: ConnectionMode, port_from: Option, port_to: Option, @@ -49,7 +49,7 @@ impl Options { Ok(Self { storage_mountpoint, storage_drive, - discord_username, + rewards_address, connection_mode, port_edit: false, port_from, @@ -192,7 +192,7 @@ impl Component for Options { .style(Style::default().fg(GHOST_WHITE)); // Beta Rewards Program - let beta_legend = if self.discord_username.is_empty() { + let beta_legend = if self.rewards_address.is_empty() { " Add Wallet " } else { " Change Wallet " @@ -215,7 +215,7 @@ impl Component for Options { ), Cell::from( Line::from(vec![Span::styled( - format!(" {} ", self.discord_username), + format!(" {} ", self.rewards_address), Style::default().fg(VIVID_SKY_BLUE), )]) .alignment(Alignment::Left), @@ -354,7 +354,7 @@ impl Component for Options { | Scene::ChangeDrivePopUp | Scene::ChangeConnectionModePopUp | Scene::ChangePortsPopUp { .. } - | Scene::OptionsBetaProgrammePopUp + | Scene::OptionsRewardsAddressPopUp | Scene::ResetNodesPopUp => { self.active = true; // make sure we're in navigation mode @@ -385,11 +385,11 @@ impl Component for Options { self.port_from = Some(from); self.port_to = Some(to); } - OptionsActions::TriggerBetaProgramme => { - return Ok(Some(Action::SwitchScene(Scene::OptionsBetaProgrammePopUp))); + OptionsActions::TriggerRewardsAddress => { + return Ok(Some(Action::SwitchScene(Scene::OptionsRewardsAddressPopUp))); } - OptionsActions::UpdateBetaProgrammeUsername(username) => { - self.discord_username = username; + OptionsActions::UpdateRewardsAddress(rewards_address) => { + self.rewards_address = rewards_address; } OptionsActions::TriggerAccessLogs => { if let Err(e) = system::open_folder( diff --git a/node-launchpad/src/components/popup.rs b/node-launchpad/src/components/popup.rs index 703ff50eae..4c0c37a1c7 100644 --- a/node-launchpad/src/components/popup.rs +++ b/node-launchpad/src/components/popup.rs @@ -6,9 +6,9 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -pub mod beta_programme; pub mod change_drive; pub mod connection_mode; pub mod manage_nodes; pub mod port_range; pub mod reset_nodes; +pub mod rewards_address; diff --git a/node-launchpad/src/components/popup/beta_programme.rs b/node-launchpad/src/components/popup/rewards_address.rs similarity index 73% rename from node-launchpad/src/components/popup/beta_programme.rs rename to node-launchpad/src/components/popup/rewards_address.rs index f512f9d0a4..6f8eda7db0 100644 --- a/node-launchpad/src/components/popup/beta_programme.rs +++ b/node-launchpad/src/components/popup/rewards_address.rs @@ -20,14 +20,14 @@ use ratatui::{prelude::*, widgets::*}; use regex::Regex; use tui_input::{backend::crossterm::EventHandler, Input}; -const INPUT_SIZE_USERNAME: u16 = 42; // Etherum address plus 0x -const INPUT_AREA_USERNAME: u16 = INPUT_SIZE_USERNAME + 2; // +2 for the padding +const INPUT_SIZE_REWARDS_ADDRESS: u16 = 42; // Etherum address plus 0x +const INPUT_AREA_REWARDS_ADDRESS: u16 = INPUT_SIZE_REWARDS_ADDRESS + 2; // +2 for the padding -pub struct BetaProgramme { +pub struct RewardsAddress { /// Whether the component is active right now, capturing keystrokes + draw things. active: bool, - state: BetaProgrammeState, - discord_input_field: Input, + state: RewardsAddressState, + rewards_address_input_field: Input, // cache the old value incase user presses Esc. old_value: String, back_to: Scene, @@ -35,24 +35,23 @@ pub struct BetaProgramme { } #[allow(dead_code)] -enum BetaProgrammeState { - DiscordIdAlreadySet, +enum RewardsAddressState { + RewardsAddressAlreadySet, ShowTCs, - RejectTCs, - AcceptTCsAndEnterDiscordId, + AcceptTCsAndEnterRewardsAddress, } -impl BetaProgramme { - pub fn new(username: String) -> Self { - let state = if username.is_empty() { - BetaProgrammeState::ShowTCs +impl RewardsAddress { + pub fn new(rewards_address: String) -> Self { + let state = if rewards_address.is_empty() { + RewardsAddressState::ShowTCs } else { - BetaProgrammeState::DiscordIdAlreadySet + RewardsAddressState::RewardsAddressAlreadySet }; Self { active: false, state, - discord_input_field: Input::default().with_value(username), + rewards_address_input_field: Input::default().with_value(rewards_address), old_value: Default::default(), back_to: Scene::Status, can_save: false, @@ -60,11 +59,11 @@ impl BetaProgramme { } pub fn validate(&mut self) { - if self.discord_input_field.value().is_empty() { + if self.rewards_address_input_field.value().is_empty() { self.can_save = false; } else { let re = Regex::new(r"^0x[a-fA-F0-9]{40}$").expect("Failed to compile regex"); - self.can_save = re.is_match(self.discord_input_field.value()); + self.can_save = re.is_match(self.rewards_address_input_field.value()); } } @@ -73,18 +72,22 @@ impl BetaProgramme { KeyCode::Enter => { self.validate(); if self.can_save { - let username = self.discord_input_field.value().to_string().to_lowercase(); - self.discord_input_field = username.clone().into(); + let rewards_address = self + .rewards_address_input_field + .value() + .to_string() + .to_lowercase(); + self.rewards_address_input_field = rewards_address.clone().into(); debug!( - "Got Enter, saving the discord username {username:?} and switching to DiscordIdAlreadySet, and Home Scene", + "Got Enter, saving the rewards address {rewards_address:?} and switching to RewardsAddressAlreadySet, and Home Scene", ); - self.state = BetaProgrammeState::DiscordIdAlreadySet; + self.state = RewardsAddressState::RewardsAddressAlreadySet; return vec![ - Action::StoreDiscordUserName(username.clone()), - Action::OptionsActions(OptionsActions::UpdateBetaProgrammeUsername( - username, - )), // FIXME: Change OptionsActions::UpdateBetaProgrammeUsername name + Action::StoreRewardsAddress(rewards_address.clone()), + Action::OptionsActions(OptionsActions::UpdateRewardsAddress( + rewards_address, + )), Action::SwitchScene(Scene::Status), ]; } @@ -96,8 +99,8 @@ impl BetaProgramme { self.old_value ); // reset to old value - self.discord_input_field = self - .discord_input_field + self.rewards_address_input_field = self + .rewards_address_input_field .clone() .with_value(self.old_value.clone()); vec![Action::SwitchScene(self.back_to)] @@ -105,13 +108,17 @@ impl BetaProgramme { KeyCode::Char(' ') => vec![], KeyCode::Backspace => { // if max limit reached, we should allow Backspace to work. - self.discord_input_field.handle_event(&Event::Key(key)); + self.rewards_address_input_field + .handle_event(&Event::Key(key)); self.validate(); vec![] } _ => { - if self.discord_input_field.value().chars().count() < INPUT_SIZE_USERNAME as usize { - self.discord_input_field.handle_event(&Event::Key(key)); + if self.rewards_address_input_field.value().chars().count() + < INPUT_SIZE_REWARDS_ADDRESS as usize + { + self.rewards_address_input_field + .handle_event(&Event::Key(key)); self.validate(); } vec![] @@ -121,43 +128,35 @@ impl BetaProgramme { } } -impl Component for BetaProgramme { +impl Component for RewardsAddress { fn handle_key_events(&mut self, key: KeyEvent) -> Result> { if !self.active { return Ok(vec![]); } // while in entry mode, keybinds are not captured, so gotta exit entry mode from here let send_back = match &self.state { - BetaProgrammeState::DiscordIdAlreadySet => self.capture_inputs(key), - BetaProgrammeState::ShowTCs => match key.code { + RewardsAddressState::RewardsAddressAlreadySet => self.capture_inputs(key), + RewardsAddressState::ShowTCs => match key.code { KeyCode::Char('y') | KeyCode::Char('Y') => { - let is_discord_id_set = !self.discord_input_field.value().is_empty(); - if is_discord_id_set { - debug!("User accepted the TCs, but discord id already set, moving to DiscordIdAlreadySet"); - self.state = BetaProgrammeState::DiscordIdAlreadySet; + if !self.rewards_address_input_field.value().is_empty() { + debug!("User accepted the TCs, but rewards address already set, moving to RewardsAddressAlreadySet"); + self.state = RewardsAddressState::RewardsAddressAlreadySet; } else { - debug!("User accepted the TCs, but no discord id set, moving to AcceptTCsAndEnterDiscordId"); - self.state = BetaProgrammeState::AcceptTCsAndEnterDiscordId; + debug!("User accepted the TCs, but no rewards address set, moving to AcceptTCsAndEnterRewardsAddress"); + self.state = RewardsAddressState::AcceptTCsAndEnterRewardsAddress; } vec![] } KeyCode::Esc => { debug!("User rejected the TCs, moving to original screen"); - self.state = BetaProgrammeState::ShowTCs; + self.state = RewardsAddressState::ShowTCs; vec![Action::SwitchScene(self.back_to)] } _ => { vec![] } }, - BetaProgrammeState::RejectTCs => { - if let KeyCode::Esc = key.code { - debug!("RejectTCs msg closed. Switching to Status scene."); - self.state = BetaProgrammeState::ShowTCs; - } - vec![Action::SwitchScene(self.back_to)] - } - BetaProgrammeState::AcceptTCsAndEnterDiscordId => self.capture_inputs(key), + RewardsAddressState::AcceptTCsAndEnterRewardsAddress => self.capture_inputs(key), }; Ok(send_back) } @@ -165,12 +164,12 @@ impl Component for BetaProgramme { fn update(&mut self, action: Action) -> Result> { let send_back = match action { Action::SwitchScene(scene) => match scene { - Scene::StatusBetaProgrammePopUp | Scene::OptionsBetaProgrammePopUp => { + Scene::StatusRewardsAddressPopUp | Scene::OptionsRewardsAddressPopUp => { self.active = true; - self.old_value = self.discord_input_field.value().to_string(); - if scene == Scene::StatusBetaProgrammePopUp { + self.old_value = self.rewards_address_input_field.value().to_string(); + if scene == Scene::StatusRewardsAddressPopUp { self.back_to = Scene::Status; - } else if scene == Scene::OptionsBetaProgrammePopUp { + } else if scene == Scene::OptionsRewardsAddressPopUp { self.back_to = Scene::Options; } // Set to InputMode::Entry as we want to handle everything within our handle_key_events @@ -220,7 +219,7 @@ impl Component for BetaProgramme { clear_area(f, layer_zero); match self.state { - BetaProgrammeState::DiscordIdAlreadySet => { + RewardsAddressState::RewardsAddressAlreadySet => { self.validate(); // FIXME: maybe this should be somewhere else // split into 4 parts, for the prompt, input, text, dash , and buttons let layer_two = Layout::new( @@ -251,10 +250,11 @@ impl Component for BetaProgramme { f.render_widget(prompt_text, layer_two[0]); let spaces = " ".repeat( - (INPUT_AREA_USERNAME - 1) as usize - self.discord_input_field.value().len(), + (INPUT_AREA_REWARDS_ADDRESS - 1) as usize + - self.rewards_address_input_field.value().len(), ); let input = Paragraph::new(Span::styled( - format!("{}{} ", spaces, self.discord_input_field.value()), + format!("{}{} ", spaces, self.rewards_address_input_field.value()), Style::default() .fg(if self.can_save { VIVID_SKY_BLUE } else { RED }) .bg(INDIGO) @@ -311,7 +311,7 @@ impl Component for BetaProgramme { )]); f.render_widget(button_yes, buttons_layer[1]); } - BetaProgrammeState::ShowTCs => { + RewardsAddressState::ShowTCs => { // split the area into 3 parts, for the lines, hypertext, buttons let layer_two = Layout::new( Direction::Vertical, @@ -374,45 +374,7 @@ impl Component for BetaProgramme { .alignment(Alignment::Right); f.render_widget(button_yes, buttons_layer[1]); } - BetaProgrammeState::RejectTCs => { - // split the area into 3 parts, for the lines, hypertext, buttons - let layer_two = Layout::new( - Direction::Vertical, - [ - // for the text - Constraint::Length(7), - // gap - Constraint::Length(5), - // for the buttons - Constraint::Length(1), - ], - ) - .split(layer_one[1]); - - let text = Paragraph::new(vec![ - Line::from(Span::styled("Terms and conditions not accepted.",Style::default())), - Line::from(Span::styled("\n\n",Style::default())), - Line::from(Span::styled("Beta Rewards Program entry not approved.",Style::default())), - Line::from(Span::styled("\n\n",Style::default())), - Line::from(Span::styled("You can still run nodes on the network, but you will not be part of the Beta Rewards Program.",Style::default())), - ] - ) - .block(Block::default().padding(Padding::horizontal(2))) - .wrap(Wrap { trim: false }); - - f.render_widget(text.fg(GHOST_WHITE), layer_two[0]); - - let dash = Block::new() - .borders(Borders::BOTTOM) - .border_style(Style::new().fg(GHOST_WHITE)); - f.render_widget(dash, layer_two[1]); - let line = Line::from(vec![Span::styled( - " Close [Esc]", - Style::default().fg(LIGHT_PERIWINKLE), - )]); - f.render_widget(line, layer_two[2]); - } - BetaProgrammeState::AcceptTCsAndEnterDiscordId => { + RewardsAddressState::AcceptTCsAndEnterRewardsAddress => { // split into 4 parts, for the prompt, input, text, dash , and buttons let layer_two = Layout::new( Direction::Vertical, @@ -442,10 +404,11 @@ impl Component for BetaProgramme { f.render_widget(prompt.fg(GHOST_WHITE), layer_two[0]); let spaces = " ".repeat( - (INPUT_AREA_USERNAME - 1) as usize - self.discord_input_field.value().len(), + (INPUT_AREA_REWARDS_ADDRESS - 1) as usize + - self.rewards_address_input_field.value().len(), ); let input = Paragraph::new(Span::styled( - format!("{}{} ", spaces, self.discord_input_field.value()), + format!("{}{} ", spaces, self.rewards_address_input_field.value()), Style::default().fg(VIVID_SKY_BLUE).bg(INDIGO).underlined(), )) .alignment(Alignment::Center); diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index 90706c488d..3feb403485 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -85,8 +85,8 @@ pub struct Status<'a> { items: Option>>, // Amount of nodes nodes_to_start: usize, - // Discord username - discord_username: String, + // Rewards address + rewards_address: String, // Currently the node registry file does not support concurrent actions and thus can lead to // inconsistent state. Another solution would be to have a file lock/db. lock_registry: Option, @@ -114,7 +114,7 @@ pub enum LockRegistryState { pub struct StatusConfig { pub allocated_disk_space: usize, - pub discord_username: String, + pub rewards_address: String, pub peers_args: PeersArgs, pub safenode_path: Option, pub data_dir_path: PathBuf, @@ -138,7 +138,7 @@ impl Status<'_> { items: None, nodes_to_start: config.allocated_disk_space, lock_registry: None, - discord_username: config.discord_username, + rewards_address: config.rewards_address, safenode_path: config.safenode_path, data_dir_path: config.data_dir_path, connection_mode: config.connection_mode, @@ -356,7 +356,7 @@ impl Component for Status<'_> { let _ = self.update_node_items(); } Action::SwitchScene(scene) => match scene { - Scene::Status | Scene::StatusBetaProgrammePopUp => { + Scene::Status | Scene::StatusRewardsAddressPopUp => { self.active = true; // make sure we're in navigation mode return Ok(Some(Action::SwitchInputMode(InputMode::Navigation))); @@ -374,17 +374,17 @@ impl Component for Status<'_> { return Ok(Some(Action::StatusActions(StatusActions::StartNodes))); } } - Action::StoreDiscordUserName(username) => { - debug!("Storing discord username: {username:?}"); - let has_changed = self.discord_username != username; + Action::StoreRewardsAddress(rewards_address) => { + debug!("Storing rewards address: {rewards_address:?}"); + let has_changed = self.rewards_address != rewards_address; let we_have_nodes = !self.node_services.is_empty(); - self.discord_username = username; + self.rewards_address = rewards_address; if we_have_nodes && has_changed { debug!("Setting lock_registry to ResettingNodes"); self.lock_registry = Some(LockRegistryState::ResettingNodes); - info!("Resetting safenode services because the Discord Username was reset."); + info!("Resetting safenode services because the Rewards Address was reset."); let action_sender = self.get_actions_sender()?; reset_nodes(action_sender, false); } @@ -531,7 +531,7 @@ impl Component for Status<'_> { let maintain_nodes_args = MaintainNodesArgs { count: self.nodes_to_start as u16, - owner: self.discord_username.clone(), + owner: self.rewards_address.clone(), peers_args: self.peers_args.clone(), run_nat_detection: self.should_we_run_nat_detection(), safenode_path: self.safenode_path.clone(), @@ -539,7 +539,7 @@ impl Component for Status<'_> { action_sender: action_sender.clone(), connection_mode: self.connection_mode, port_range: Some(port_range), - rewards_address: self.discord_username.clone(), + rewards_address: self.rewards_address.clone(), }; debug!("Calling maintain_n_running_nodes"); @@ -561,9 +561,9 @@ impl Component for Status<'_> { stop_nodes(running_nodes, action_sender); } - StatusActions::TriggerBetaProgramme => { - if self.discord_username.is_empty() { - return Ok(Some(Action::SwitchScene(Scene::StatusBetaProgrammePopUp))); + StatusActions::TriggerRewardsAddress => { + if self.rewards_address.is_empty() { + return Ok(Some(Action::SwitchScene(Scene::StatusRewardsAddressPopUp))); } else { return Ok(None); } @@ -666,7 +666,7 @@ impl Component for Status<'_> { let column_constraints = [Constraint::Length(23), Constraint::Fill(1)]; let stats_table = Table::new(stats_rows, stats_width).widths(column_constraints); - let wallet_not_set = if self.discord_username.is_empty() { + let wallet_not_set = if self.rewards_address.is_empty() { vec![ Span::styled("Press ".to_string(), Style::default().fg(VIVID_SKY_BLUE)), Span::styled("[Ctrl+B] ".to_string(), Style::default().fg(GHOST_WHITE)), @@ -696,7 +696,7 @@ impl Component for Status<'_> { let column_constraints = [ Constraint::Length(23), Constraint::Fill(1), - Constraint::Length(if self.discord_username.is_empty() { + Constraint::Length(if self.rewards_address.is_empty() { 41 //TODO: make it dynamic with wallet_not_set } else { 0 diff --git a/node-launchpad/src/mode.rs b/node-launchpad/src/mode.rs index 3f4871302e..b6cc6c4a40 100644 --- a/node-launchpad/src/mode.rs +++ b/node-launchpad/src/mode.rs @@ -21,8 +21,8 @@ pub enum Scene { ChangePortsPopUp { connection_mode_old_value: Option, }, - StatusBetaProgrammePopUp, - OptionsBetaProgrammePopUp, + StatusRewardsAddressPopUp, + OptionsRewardsAddressPopUp, ManageNodesPopUp, ResetNodesPopUp, }