Skip to content

Commit

Permalink
chore: update when non-resident keys display
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Dec 5, 2024
1 parent afe3da8 commit 3517b7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func UpdateAccountExpiredTime(t Time, account Account, state *StateModel) Accoun
var nonResidentKey = true
for _, key := range *state.ParticipationKeys {
// We have the key locally, update the residency
if key.Address == account.Address && account.Participation != nil && IsParticipationKeyActive(key, *account.Participation) {
if account.Status == "Offline" || (key.Address == account.Address && account.Participation != nil && IsParticipationKeyActive(key, *account.Participation)) {
nonResidentKey = false
}
}
Expand Down
4 changes: 1 addition & 3 deletions ui/pages/accounts/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ func (m ViewModel) makeRows() *[]table.Row {
}

if m.Data.Accounts[addr].NonResidentKey {
if expires == "⚠ EXPIRED" {
expires = "⚠ EXPIRED-NON-RESIDENT-KEY"
} else {
if expires != "⚠ EXPIRED" && expires != "EXPIRED" {
expires = "⚠ NON-RESIDENT-KEY"
}

Check warning on line 105 in ui/pages/accounts/model.go

View check run for this annotation

Codecov / codecov/patch

ui/pages/accounts/model.go#L103-L105

Added lines #L103 - L105 were not covered by tests
}
Expand Down

0 comments on commit 3517b7d

Please sign in to comment.