Skip to content

Commit

Permalink
Merge pull request #61 from algorandfoundation/fix/bootstrap-no-answers
Browse files Browse the repository at this point in the history
fix: bootstrap refinements
  • Loading branch information
tasosbit authored Jan 7, 2025
2 parents d3bafb8 + d9a2545 commit c6c3786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ var bootstrapCmd = &cobra.Command{
fmt.Println(out)

model := bootstrap.NewModel()
if algod.IsInstalled() {
model.BootstrapMsg.Install = false
model.Question = bootstrap.CatchupQuestion
}
p := tea.NewProgram(model)
var msg *app.BootstrapMsg
go func() {
Expand Down
4 changes: 2 additions & 2 deletions ui/bootstrap/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch m.Question {
case InstallQuestion:
m.Question = CatchupQuestion
m.BootstrapMsg.Install = true
m.BootstrapMsg.Install = false
case CatchupQuestion:
m.Question = WaitingQuestion
m.BootstrapMsg.Catchup = true
m.BootstrapMsg.Catchup = false
case WaitingQuestion:
return m, tea.Sequence(m.Outside.Emit(m.BootstrapMsg), tea.Quit)
}
Expand Down

0 comments on commit c6c3786

Please sign in to comment.