From 793f584e9a3ddf1cc7b43424e5746d7b91e20bcf Mon Sep 17 00:00:00 2001 From: Lautaro Mazzitelli Date: Fri, 25 Oct 2024 15:25:05 +0200 Subject: [PATCH] fix(launchpad): rewards address req to start nodes --- node-launchpad/src/components/status.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/node-launchpad/src/components/status.rs b/node-launchpad/src/components/status.rs index 3feb403485..0e4e7a85b8 100644 --- a/node-launchpad/src/components/status.rs +++ b/node-launchpad/src/components/status.rs @@ -507,6 +507,13 @@ impl Component for Status<'_> { StatusActions::StartNodes => { debug!("Got action to start nodes"); + if self.rewards_address.is_empty() { + info!("Rewards address is not set. Ask for input."); + return Ok(Some(Action::StatusActions( + StatusActions::TriggerRewardsAddress, + ))); + } + if self.nodes_to_start == 0 { info!("Nodes to start not set. Ask for input."); return Ok(Some(Action::StatusActions( @@ -720,7 +727,7 @@ impl Component for Status<'_> { // No nodes. Empty Table. if let Some(ref items) = self.items { - if items.items.is_empty() { + if items.items.is_empty() || self.rewards_address.is_empty() { let line1 = Line::from(vec![ Span::styled("Press ", Style::default().fg(LIGHT_PERIWINKLE)), Span::styled("[Ctrl+G] ", Style::default().fg(GHOST_WHITE).bold()), @@ -833,7 +840,7 @@ impl Component for Status<'_> { let footer = Footer::default(); let footer_state = if let Some(ref items) = self.items { - if !items.items.is_empty() { + if !items.items.is_empty() || self.rewards_address.is_empty() { if !self.get_running_nodes().is_empty() { &mut NodesToStart::Running } else {