Skip to content

Commit

Permalink
fix: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 31, 2024
1 parent cd692e0 commit efe5d29
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions ui/viewport.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ func DeleteKey(client *api.ClientWithResponses, key keys.DeleteKey) tea.Cmd {
}
}

// Check if there are any participation keys available for the account
// Prevents navigation to the transaction page if there are no keys
func tGuard(m ViewportViewModel) bool {
if m.Data == nil || len(*m.Data.ParticipationKeys) == 0 {
panic("No participation keys available for this account. Please add a key first.")
errorMsg := "No participation keys available for this account. Please add a key first."
m.errorMsg = &errorMsg
return true
}

return false
}

// Init is a no-op
func (m ViewportViewModel) Init() tea.Cmd {
return nil
Expand Down

0 comments on commit efe5d29

Please sign in to comment.