From eac0b4ae446437a6571be2fb5a4d93c6cb165bd8 Mon Sep 17 00:00:00 2001 From: Ramiz Siddiqui <97471826+ramizhasan111@users.noreply.github.com> Date: Fri, 6 Oct 2023 17:33:27 +0500 Subject: [PATCH] chore: remove unnecessary keystate change (#4036) --- state-chain/pallets/cf-vaults/src/lib.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/state-chain/pallets/cf-vaults/src/lib.rs b/state-chain/pallets/cf-vaults/src/lib.rs index 4b153a60e8..0d7e45a1c5 100644 --- a/state-chain/pallets/cf-vaults/src/lib.rs +++ b/state-chain/pallets/cf-vaults/src/lib.rs @@ -988,23 +988,6 @@ impl, I: 'static> VaultKeyWitnessedHandler for Pallet::InvalidRotationStatus ); - - // Unlock the key that was used to authorise the activation, *if* this was triggered via - // broadcast (as opposed to governance, for example). - // TODO: use broadcast callbacks for this. - CurrentVaultEpochAndState::::try_mutate(|state: &mut Option| { - state - .as_mut() - .map(|VaultEpochAndState { key_state, .. }| key_state.unlock()) - .ok_or(()) - }) - .unwrap_or_else(|_| { - log::info!( - "No key to unlock for {}. This is expected if the rotation was triggered via governance.", - T::Chain::NAME, - ); - }); - Self::activate_new_key(new_public_key, block_number); Ok(().into())