diff --git a/src/components/validator/stash_details.rs b/src/components/validator/stash_details.rs index 238fd2c..5ebdab1 100644 --- a/src/components/validator/stash_details.rs +++ b/src/components/validator/stash_details.rs @@ -24,6 +24,7 @@ pub struct StashDetails { staked_total: Option, staked_active: Option, stash_account_id: [u8; 32], + stash_secret: [u8; 32], } impl Default for StashDetails { @@ -45,6 +46,7 @@ impl StashDetails { staked_total: None, staked_active: None, stash_account_id: [0u8; 32], + stash_secret: [0u8; 32], } } @@ -94,6 +96,7 @@ impl Component for StashDetails { fn update(&mut self, action: Action) -> Result> { match action { + Action::SetStashSecret(secret) => self.stash_secret = secret, Action::SetStashAccount(account_id) => self.stash_account_id = account_id, Action::SetIsBonded(is_bonded) => self.is_bonded = is_bonded, Action::SetStakedAmountRatio(total, active) => { @@ -103,7 +106,7 @@ impl Component for StashDetails { Action::BalanceResponse(account_id, maybe_balance) if account_id == self.stash_account_id => { if let Some(network_tx) = &self.network_tx { let _ = network_tx.send(Action::SetSender( - hex::encode(self.stash_account_id), + hex::encode(self.stash_secret), maybe_balance.clone().map(|b| b.nonce))); } self.free_balance = maybe_balance.map(|balance| balance.free diff --git a/src/network/mod.rs b/src/network/mod.rs index 7713628..f7ebc8e 100644 --- a/src/network/mod.rs +++ b/src/network/mod.rs @@ -265,6 +265,7 @@ impl Network { Action::BondValidatorExtraFrom(sender, amount) => { let sender_str = hex::encode(sender); let maybe_nonce = self.senders.get_mut(&sender_str); + if let Ok(tx_progress) = predefined_txs::bond_extra( &self.action_tx, &self.online_client_api,