diff --git a/Cargo.toml b/Cargo.toml index d9c5cd8..5bbdabc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "ghost-eye" authors = ["str3tch "] description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost" -version = "0.3.34" +version = "0.3.35" edition = "2021" [dependencies] diff --git a/src/components/nominator/current_validator_details.rs b/src/components/nominator/current_validator_details.rs index 4c0d5a4..3fded61 100644 --- a/src/components/nominator/current_validator_details.rs +++ b/src/components/nominator/current_validator_details.rs @@ -95,7 +95,7 @@ impl CurrentValidatorDetails { self.choosen = account_id; self.points_ratio = match total { 0 => 0.0, - _ => individual as f64 / total as f64, + _ => (individual as f64 / total as f64) * 100.0, }; if let Some(network_tx) = &self.network_tx { let _ = network_tx.send(Action::GetErasStakersOverview(account_id, false)); diff --git a/src/components/nominator/current_validators.rs b/src/components/nominator/current_validators.rs index 3f04248..2096e29 100644 --- a/src/components/nominator/current_validators.rs +++ b/src/components/nominator/current_validators.rs @@ -34,7 +34,6 @@ pub struct CurrentValidators { table_state: TableState, individual: Vec, known_validators: std::collections::HashMap<[u8; 32], String>, - active_validators: std::collections::HashSet, total_points: u32, era_index: u32, my_stash_id: Option<[u8; 32]>, @@ -58,7 +57,6 @@ impl CurrentValidators { table_state: TableState::new(), individual: Default::default(), known_validators: Default::default(), - active_validators: Default::default(), total_points: 0, era_index: 0, my_stash_id: None, @@ -267,7 +265,6 @@ impl Component for CurrentValidators { if info.disabled { address_text = address_text.add_modifier(Modifier::CROSSED_OUT); points_text = points_text.add_modifier(Modifier::CROSSED_OUT); - } let mut current_validator_is_my_stash = false;