@@ -582,7 +582,7 @@ type ExistingGenesisReplaceOption string
582
582
583
583
const (
584
584
UseCurrentGenesis ExistingGenesisReplaceOption = "Use current one"
585
- ReplaceGenesis ExistingGenesisReplaceOption = "Replace"
585
+ ReplaceGenesis ExistingGenesisReplaceOption = "Replace" // TODO: Dynamic text based on Network
586
586
)
587
587
588
588
func NewExistingGenesisReplaceSelect (state * RunL1NodeState ) * ExistingGenesisReplaceSelect {
@@ -620,7 +620,7 @@ func (m *ExistingGenesisReplaceSelect) Update(msg tea.Msg) (tea.Model, tea.Cmd)
620
620
}
621
621
} else {
622
622
if * selected == ReplaceGenesis {
623
- m .state .replaceExisitigGenesisWithDefault = true
623
+ m .state .replaceExistingGenesisWithDefault = true
624
624
}
625
625
newLoader := NewInitializingAppLoading (m .state )
626
626
return newLoader , newLoader .Init ()
@@ -866,7 +866,8 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
866
866
if err = utils .CreateService (utils .GetRunL1NodeServiceName (), utils .GetRunL1NodeServiceContent (state .initiadVersion )); err != nil {
867
867
panic (fmt .Sprintf ("failed to create service: %v" , err ))
868
868
}
869
- if state .replaceExisitigGenesisWithDefault {
869
+
870
+ if state .replaceExistingGenesisWithDefault {
870
871
// Create a temporary home directory for the Initia node
871
872
tmpInitiaHome := filepath .Join (weaveDataPath , "tmp_initia" )
872
873
if err := os .MkdirAll (tmpInitiaHome , os .ModePerm ); err != nil {
@@ -879,15 +880,15 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
879
880
panic (fmt .Sprintf ("failed to run temporary initiad init: %v" , err ))
880
881
}
881
882
882
- // Move the temporary genesis.json file to the real Initia config path
883
+ // Move the temporary genesis.json file to the user Initia config path
883
884
tmpGenesisPath := filepath .Join (tmpInitiaHome , "config/genesis.json" )
884
- realGenesisPath := filepath .Join (initiaConfigPath , "genesis.json" )
885
- if err : = os .Rename (tmpGenesisPath , realGenesisPath ); err != nil {
885
+ userGenesisPath := filepath .Join (initiaConfigPath , "genesis.json" )
886
+ if err = os .Rename (tmpGenesisPath , userGenesisPath ); err != nil {
886
887
panic (fmt .Sprintf ("failed to move genesis.json: %v" , err ))
887
888
}
888
889
889
890
// Clean up the temporary Initia directory
890
- if err : = os .RemoveAll (tmpInitiaHome ); err != nil {
891
+ if err = os .RemoveAll (tmpInitiaHome ); err != nil {
891
892
panic (fmt .Sprintf ("failed to remove temporary Initia home directory: %v" , err ))
892
893
}
893
894
}
0 commit comments