Skip to content

Commit

Permalink
fix(ui): empty account generate key
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Nov 21, 2024
1 parent ceb0e76 commit e395e99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/viewport.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ func (m ViewportViewModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case "g":
// Only open modal when it is closed and not syncing
if !m.modal.Open && m.Data.Status.State != internal.SyncingState && m.Data.Metrics.RoundTime > 0 {
address := ""
selected := m.accountsPage.SelectedAccount()
if selected != nil {
address = selected.Address
}
return m, app.EmitModalEvent(app.ModalEvent{
Key: nil,
Address: m.accountsPage.SelectedAccount().Address,
Address: address,
Type: app.GenerateModal,
})
}
Expand Down

0 comments on commit e395e99

Please sign in to comment.