Skip to content

Commit fdca44e

Browse files
committed
fix: moniker input missing when initializing new fresh app & tests
1 parent 5246540 commit fdca44e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

models/initia/run_l1_node.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (m *ExistingAppChecker) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
220220
if m.loading.Completing {
221221

222222
if !m.state.existingApp {
223-
return NewMinGasPriceInput(m.state), nil
223+
return NewRunL1NodeMonikerInput(m.state), nil
224224
} else {
225225
return NewExistingAppReplaceSelect(m.state), nil
226226
}
@@ -791,7 +791,7 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
791791

792792
// TODO: Remove this logic when we have a working version of the node_info endpoint
793793
if state.chainId == "initiation-2" {
794-
nodeVersion = "v0.5.1"
794+
nodeVersion = "v0.5.3"
795795
} else {
796796
applicationVersion, ok := result["application_version"].(map[string]interface{})
797797
if !ok {

models/initia/run_l1_node_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestRunL1NodeNetworkSelect_SaveToState(t *testing.T) {
4242
// _, _ = networkSelect.Update(tea.KeyMsg{Type: tea.KeyDown})
4343
m, _ := networkSelect.Update(tea.KeyMsg{Type: tea.KeyEnter})
4444

45-
assert.Equal(t, "Testnet", mockState.network)
45+
assert.Equal(t, "Testnet (initiation-2)", mockState.network)
4646
assert.Equal(t, "https://storage.googleapis.com/initia-binaries/genesis.json", mockState.genesisEndpoint)
4747

4848
assert.IsType(t, m, &ExistingAppChecker{})
@@ -119,7 +119,7 @@ func TestExistingAppChecker(t *testing.T) {
119119

120120
existingAppChecker := NewExistingAppChecker(mockState)
121121
m, _ := existingAppChecker.Update(utils.EndLoading{})
122-
assert.IsType(t, m, &MinGasPriceInput{})
122+
assert.IsType(t, m, &RunL1NodeMonikerInput{})
123123

124124
mockState.existingApp = true
125125
m, _ = existingAppChecker.Update(utils.EndLoading{})
@@ -787,13 +787,13 @@ func TestExistingDataReplaceSelect(t *testing.T) {
787787
{
788788
// Simulate selecting the second option (ReplaceData) with Snapshot and pressing enter
789789
keyPresses: []tea.KeyMsg{tea.KeyMsg{Type: tea.KeyDown}, tea.KeyMsg{Type: tea.KeyEnter}},
790-
expectedModel: &ExistingDataReplaceSelect{}, // Should transition to SnapshotEndpointInput for Snapshot sync method
790+
expectedModel: &TerminalState{}, // Should transition to SnapshotEndpointInput for Snapshot sync method
791791
syncMethod: string(Snapshot),
792792
},
793793
{
794794
// Simulate selecting ReplaceData with StateSync and pressing enter
795795
keyPresses: []tea.KeyMsg{tea.KeyMsg{Type: tea.KeyDown}, tea.KeyMsg{Type: tea.KeyEnter}},
796-
expectedModel: &ExistingDataReplaceSelect{}, // Should transition to StateSyncEndpointInput for StateSync sync method
796+
expectedModel: &TerminalState{}, // Should transition to StateSyncEndpointInput for StateSync sync method
797797
syncMethod: string(StateSync),
798798
},
799799
}

0 commit comments

Comments
 (0)