From 4fd703c99e6444418cfa0af4351237fd9cc4011b Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Sun, 13 Feb 2022 21:48:45 +0100
Subject: [PATCH] feat(idty): add event IdtyRemoved

---
 pallets/identity/src/lib.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs
index b4d0c19a5..98717e842 100644
--- a/pallets/identity/src/lib.rs
+++ b/pallets/identity/src/lib.rs
@@ -214,6 +214,9 @@ pub mod pallet {
         /// An identity has been validated
         /// [idty_index]
         IdtyValidated { idty_index: T::IdtyIndex },
+        /// An identity has been removed
+        /// [idty_index]
+        IdtyRemoved { idty_index: T::IdtyIndex },
     }
 
     // CALLS //
@@ -462,6 +465,7 @@ pub mod pallet {
             if let Some(idty_val) = Identities::<T>::take(idty_index) {
                 frame_system::Pallet::<T>::dec_sufficients(&idty_val.owner_key);
             }
+            Self::deposit_event(Event::IdtyRemoved { idty_index });
             T::OnIdtyChange::on_idty_change(idty_index, IdtyEvent::Removed);
             0
         }
-- 
GitLab