@@ -319,7 +319,16 @@ func (m *EnableFeaturesCheckbox) Init() tea.Cmd {
319
319
func (m * EnableFeaturesCheckbox ) Update (msg tea.Msg ) (tea.Model , tea.Cmd ) {
320
320
cb , cmd , done := m .Select (msg )
321
321
if done {
322
- // TODO: Remove and pull this logic
322
+ for idx , isSelected := range cb .Selected {
323
+ if isSelected {
324
+ switch cb .Options [idx ] {
325
+ case LCD :
326
+ m .state .enableLCD = true
327
+ case gRPC :
328
+ m .state .enableGRPC = true
329
+ }
330
+ }
331
+ }
323
332
return NewSeedsInput (m .state ), nil
324
333
}
325
334
@@ -416,10 +425,13 @@ func (m *ExistingGenesisChecker) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
416
425
}
417
426
418
427
initiaConfigPath := filepath .Join (homeDir , utils .InitiaConfigDirectory )
419
- genesisFilePath := filepath .Join (initiaConfigPath , "genesis.json " )
428
+ genesisFilePath := filepath .Join (initiaConfigPath , "genesis.jsona " )
420
429
if ! utils .FileOrFolderExists (genesisFilePath ) {
421
430
m .state .existingGenesis = false
422
- // TODO: Continue
431
+ if m .state .network == string (Local ) {
432
+ return m , tea .Quit
433
+ }
434
+ return NewGenesisEndpointInput (m .state ), nil
423
435
} else {
424
436
m .state .existingGenesis = true
425
437
return NewExistingGenesisReplaceSelect (m .state ), nil
@@ -469,7 +481,7 @@ func (m *ExistingGenesisReplaceSelect) Update(msg tea.Msg) (tea.Model, tea.Cmd)
469
481
// TODO: Continue
470
482
fmt .Println ("\n [info] Using current genesis" )
471
483
case ReplaceGenesis :
472
- return NewMinGasPriceInput ( m . state ), nil
484
+ fmt . Println ( " \n [info] Replacing genesis" )
473
485
}
474
486
return m , tea .Quit
475
487
}
@@ -488,3 +500,33 @@ func (m *ExistingGenesisReplaceSelect) View() string {
488
500
}
489
501
return view + "\n Press Enter to select, or q to quit."
490
502
}
503
+
504
+ type GenesisEndpointInput struct {
505
+ utils.TextInput
506
+ state * RunL1NodeState
507
+ }
508
+
509
+ func NewGenesisEndpointInput (state * RunL1NodeState ) * GenesisEndpointInput {
510
+ return & GenesisEndpointInput {
511
+ TextInput : utils .NewTextInput (),
512
+ state : state ,
513
+ }
514
+ }
515
+
516
+ func (m * GenesisEndpointInput ) Init () tea.Cmd {
517
+ return nil
518
+ }
519
+
520
+ func (m * GenesisEndpointInput ) Update (msg tea.Msg ) (tea.Model , tea.Cmd ) {
521
+ input , done := m .TextInput .Update (msg )
522
+ if done {
523
+ m .state .genesisEndpoint = input .Text
524
+ return m , tea .Quit
525
+ }
526
+ m .TextInput = input
527
+ return m , nil
528
+ }
529
+
530
+ func (m * GenesisEndpointInput ) View () string {
531
+ return fmt .Sprintf ("i There is no config/genesis.json available. You will need to enter the required information to proceed.\n \n Please specify the endpoint to fetch genesis.json\n > %s\n " , m .TextInput .View ())
532
+ }
0 commit comments