Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(launchpad): rewards address req to start nodes #2321

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions node-launchpad/src/components/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,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(
Expand Down Expand Up @@ -739,7 +746,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()),
Expand Down Expand Up @@ -852,7 +859,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 {
Expand Down
Loading