From 71d38dc81bcfb032a1bf2cbecc08362baa2ed0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Sun, 15 Dec 2024 18:46:27 -0500 Subject: [PATCH] fix(fc-pallet-pass): use `Tuple::encode` to construct `task_name` to remove a specific `session_key`, as it is more stable. --- pallets/pass/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pallets/pass/src/lib.rs b/pallets/pass/src/lib.rs index 0d52506..44ab8bc 100644 --- a/pallets/pass/src/lib.rs +++ b/pallets/pass/src/lib.rs @@ -392,8 +392,7 @@ impl, I: 'static> Pallet { } fn task_name_from_session_key(session_key: &T::AccountId) -> TaskName { - use sp_runtime::format; - blake2_256(format!("remove_session_key_{:?}", &session_key.encode()).as_bytes()) + blake2_256(&("remove_session_key", session_key).encode()) } /// Infallibly cancels an already scheduled session key removal