From 466c79ff1c2c074837d091f445316eb688493b5a Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Tue, 16 May 2023 23:11:41 +0200
Subject: [PATCH] remove duplicate UD handling

---
 runtime/common/src/handlers.rs | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs
index 9c3c7ac84..95a6ccabd 100644
--- a/runtime/common/src/handlers.rs
+++ b/runtime/common/src/handlers.rs
@@ -49,17 +49,7 @@ where
         match idty_event {
             IdtyEvent::Validated => {
                 // when identity is validated, it starts getting right to UD
-                // this is not a duplicate with membership acquired handler
-                // because when membership acquired handler is called
-                // the identity does not exists yet and so UD do not get initialized
-                pallet_identity::Identities::<T>::mutate_exists(idty_index, |idty_val_opt| {
-                    if let Some(ref mut idty_val) = idty_val_opt {
-                        idty_val.data = IdtyData {
-                            first_eligible_ud:
-                                pallet_universal_dividend::Pallet::<T>::init_first_eligible_ud(),
-                        }
-                    }
-                });
+                // but this is handeled by membership event handler (MembershipAcquired)
             }
             IdtyEvent::ChangedOwnerKey { new_owner_key } => {
                 if let Err(e) = pallet_authority_members::Pallet::<T>::change_owner_key(
-- 
GitLab