remove inconsistency in disabled validators

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-11-09 21:19:30 +03:00
parent 0a28acede7
commit e91dc51ff7
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 8 additions and 17 deletions

View File

@ -2,7 +2,7 @@
name = "ghost-eye"
authors = ["str3tch <stretch@ghostchain.io>"]
description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost"
version = "0.3.70"
version = "0.3.71"
edition = "2021"
homepage = "https://git.ghostchain.io/ghostchain"
repository = "https://git.ghostchain.io/ghostchain/ghost-eye"

View File

@ -285,13 +285,6 @@ impl CurrentValidators {
self.era_index = era_index;
if individual.len() > 0 {
if let Some(account_id) = self.my_stash_id {
if let Some(index) = self.individual
.iter()
.position(|item| item.account_id == account_id) {
self.individual.swap(0, index);
}
}
if previous_length == 0 {
self.filtered_vector = self.individual.clone();
self.scroll_state = self.scroll_state.content_length(self.individual.len());
@ -429,8 +422,7 @@ impl Component for CurrentValidators {
self.filtered_vector
.iter()
.chain(&self.not_active_nominations)
.enumerate()
.map(|(index, info)| {
.map(|info| {
let is_validator_choosen = self.checked_validators.contains(&info.account_id);
let is_current_nomination = self.my_nominations
.get(&self.account_id)
@ -455,13 +447,12 @@ impl Component for CurrentValidators {
points_text = points_text.add_modifier(Modifier::CROSSED_OUT);
}
let default_name = if index == 0 && self.my_stash_id
.map(|account_id| account_id == info.account_id)
.unwrap_or_default() == true {
"My stash"
} else {
"Ghostie"
};
let default_name = self.my_stash_id
.map(|account_id|
account_id.eq(&info.account_id).then(|| "My stash")
)
.flatten()
.unwrap_or("Ghostie");
let name = self.known_validators
.get(&info.account_id)