Skip to content

Commit

Permalink
fix account id
Browse files Browse the repository at this point in the history
  • Loading branch information
paulormart committed Oct 10, 2023
1 parent 560fb11 commit 87debab
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.1] - 2023-10-10

### Changed
- Fix account id based on chain

## [0.4.0] - 2023-10-10

### Added
Expand Down
10 changes: 5 additions & 5 deletions src/runtimes/kusama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async fn try_init_hook(
for v in validators.iter_mut() {
// Try HOOK_INIT
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -385,7 +385,7 @@ async fn try_run_staking_chilled_hook(

// Try HOOK_VALIDATOR_CHILLED
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -458,7 +458,7 @@ async fn try_run_im_online_some_offline_hook(

// Try HOOK_VALIDATOR_OFFLINE
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -717,7 +717,7 @@ async fn try_run_session_hooks(
for v in validators.iter_mut() {
// Try HOOK_NEW_SESSION
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -851,7 +851,7 @@ async fn try_run_session_hooks(
let next_era_index = session.active_era_index + 1;
let next_session_index = session.current_session_index + 1;
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
format!("{}", next_era_index),
Expand Down
10 changes: 5 additions & 5 deletions src/runtimes/polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async fn try_init_hook(
for v in validators.iter_mut() {
// Try HOOK_INIT
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -385,7 +385,7 @@ async fn try_run_staking_chilled_hook(

// Try HOOK_VALIDATOR_CHILLED
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -458,7 +458,7 @@ async fn try_run_im_online_some_offline_hook(

// Try HOOK_VALIDATOR_OFFLINE
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -717,7 +717,7 @@ async fn try_run_session_hooks(
for v in validators.iter_mut() {
// Try HOOK_NEW_SESSION
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -851,7 +851,7 @@ async fn try_run_session_hooks(
let next_era_index = session.active_era_index + 1;
let next_session_index = session.current_session_index + 1;
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
format!("{}", next_era_index),
Expand Down
14 changes: 7 additions & 7 deletions src/runtimes/westend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ use crate::hooks::{
use crate::identity::Identity;
use crate::para::ParaRecords;
use crate::report::{
Init, Network, Points, RawData, Report, Section, Session, Slash,
Validator, Validators,
Init, Network, Points, RawData, Report, Section, Session, Slash, Validator,
Validators,
};
use crate::scouty::{convert_account_id, get_account_id_from_storage_key, Scouty};
use crate::stats;
Expand Down Expand Up @@ -221,7 +221,7 @@ async fn try_init_hook(
for v in validators.iter_mut() {
// Try HOOK_INIT
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -380,7 +380,7 @@ async fn try_run_staking_chilled_hook(

// Try HOOK_VALIDATOR_CHILLED
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -453,7 +453,7 @@ async fn try_run_im_online_some_offline_hook(

// Try HOOK_VALIDATOR_OFFLINE
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -659,7 +659,7 @@ async fn try_run_session_hooks(
for v in validators.iter_mut() {
// Try HOOK_NEW_SESSION
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
v.is_active.to_string(),
Expand Down Expand Up @@ -793,7 +793,7 @@ async fn try_run_session_hooks(
let next_era_index = session.active_era_index + 1;
let next_session_index = session.current_session_index + 1;
let mut args = vec![
v.stash.to_string(),
convert_account_id(v.stash.clone()).to_string(),
v.name.to_string(),
format!("0x{:?}", HexDisplay::from(&v.queued_session_keys)),
format!("{}", next_era_index),
Expand Down

0 comments on commit 87debab

Please sign in to comment.