diff --git a/Cargo.toml b/Cargo.toml index 8d3e9d4..f0660ec 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.29" +version = "0.3.30" edition = "2021" [dependencies] diff --git a/src/components/nominator/current_validator_details.rs b/src/components/nominator/current_validator_details.rs index eb4ac0c..4c0d5a4 100644 --- a/src/components/nominator/current_validator_details.rs +++ b/src/components/nominator/current_validator_details.rs @@ -81,7 +81,7 @@ impl CurrentValidatorDetails { self.is_nomination_disabled = is_disabled; match maybe_commission { Some(commission) => { - self.commission = commission as f64 / 1_000_000_000.0; + self.commission = commission as f64 / 10_000_000.0; self.is_active_validator = true; }, None => { diff --git a/src/components/validator/reward_details.rs b/src/components/validator/reward_details.rs index b8fc8f6..dfbfb61 100644 --- a/src/components/validator/reward_details.rs +++ b/src/components/validator/reward_details.rs @@ -46,7 +46,7 @@ impl RewardDetails { match self.commission { Some(commission) => { if self.nominators_blocked { "blocked".to_string() } - else { format!("{:.2}%", commission as f64 / 1_000_000_000.0) } + else { format!("{:.2}%", commission as f64 / 10_000_000.0) } }, None => DotSpinner::default().to_string(), } diff --git a/src/components/validator/validate_popup.rs b/src/components/validator/validate_popup.rs index 381d02f..ec8f70a 100644 --- a/src/components/validator/validate_popup.rs +++ b/src/components/validator/validate_popup.rs @@ -58,7 +58,7 @@ impl ValidatePopup { if let Some(network_tx) = &self.network_tx { match self.amount.value().parse::() { Ok(value) => { - let amount = (value * 1_000_000_000.0).round() as u32; + let amount = (value * 10_000_000.0).round() as u32; let _ = network_tx.send(Action::ValidateFrom(self.secret_seed, amount)); if let Some(action_tx) = &self.action_tx { let _ = action_tx.send(Action::ClosePopup); diff --git a/src/network/predefined_calls.rs b/src/network/predefined_calls.rs index 9065b86..e683432 100644 --- a/src/network/predefined_calls.rs +++ b/src/network/predefined_calls.rs @@ -503,11 +503,11 @@ pub async fn get_validator_prefs( ) -> Result<()> { let maybe_validator_prefs = super::raw_calls::staking::validators(api, None, account_id) .await?; - let (comission, blocked) = match maybe_validator_prefs { + let (commission, blocked) = match maybe_validator_prefs { Some(prefs) => (Some(prefs.commission.0), prefs.blocked), None => (None, false), }; - action_tx.send(Action::SetValidatorPrefs(comission, blocked, *account_id))?; + action_tx.send(Action::SetValidatorPrefs(commission, blocked, *account_id))?; Ok(()) }