From 18609e597078410455afc5d80879a498fc874161 Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Sat, 27 Aug 2022 21:40:11 +0200
Subject: [PATCH] =?UTF-8?q?pallet=20ud:=C2=A0remove=20temporary=20hotfix?=
 =?UTF-8?q?=20call?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pallets/universal-dividend/src/lib.rs            | 16 ----------------
 pallets/universal-dividend/src/weights.rs        |  8 --------
 .../src/weights/pallet_universal_dividend.rs     |  7 -------
 3 files changed, 31 deletions(-)

diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs
index 78be0ed1d..faf5749d2 100644
--- a/pallets/universal-dividend/src/lib.rs
+++ b/pallets/universal-dividend/src/lib.rs
@@ -398,22 +398,6 @@ pub mod pallet {
         ) -> DispatchResultWithPostInfo {
             Self::do_transfer_ud(origin, dest, value, ExistenceRequirement::KeepAlive)
         }
-
-        #[pallet::weight(T::WeightInfo::force_set_first_eligible_ud())]
-        pub fn force_set_first_eligible_ud(
-            origin: OriginFor<T>,
-            who: T::AccountId,
-            first_eligible_ud: FirstEligibleUd,
-        ) -> DispatchResultWithPostInfo {
-            ensure_root(origin)?;
-
-            T::MembersStorage::try_mutate_exists(&who, |maybe_first_eligible_ud| {
-                if let Some(ref mut first_eligible_ud_) = maybe_first_eligible_ud {
-                    *first_eligible_ud_ = first_eligible_ud;
-                }
-                Ok(().into())
-            })
-        }
     }
 
     // PUBLIC FUNCTIONS
diff --git a/pallets/universal-dividend/src/weights.rs b/pallets/universal-dividend/src/weights.rs
index 9fa338ccf..e3b860880 100644
--- a/pallets/universal-dividend/src/weights.rs
+++ b/pallets/universal-dividend/src/weights.rs
@@ -26,7 +26,6 @@ pub trait WeightInfo {
     fn claim_uds(n: u32) -> Weight;
     fn transfer_ud() -> Weight;
     fn transfer_ud_keep_alive() -> Weight;
-    fn force_set_first_eligible_ud() -> Weight;
 }
 
 // Insecure weights implementation, use it for tests only!
@@ -83,11 +82,4 @@ impl WeightInfo for () {
             .saturating_add(RocksDbWeight::get().reads(2 as Weight))
             .saturating_add(RocksDbWeight::get().writes(2 as Weight))
     }
-    // Storage: Identity IdentityIndexOf (r:1 w:0)
-    // Storage: Identity Identities (r:1 w:1)
-    fn force_set_first_eligible_ud() -> Weight {
-        (0 as Weight)
-            .saturating_add(RocksDbWeight::get().reads(2 as Weight))
-            .saturating_add(RocksDbWeight::get().writes(1 as Weight))
-    }
 }
diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs
index d5b7bfcab..9c9efb8f9 100644
--- a/runtime/common/src/weights/pallet_universal_dividend.rs
+++ b/runtime/common/src/weights/pallet_universal_dividend.rs
@@ -96,11 +96,4 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
-    // Storage: Identity IdentityIndexOf (r:1 w:0)
-    // Storage: Identity Identities (r:1 w:1)
-    fn force_set_first_eligible_ud() -> Weight {
-        (57_000_000 as Weight)
-            .saturating_add(T::DbWeight::get().reads(2 as Weight))
-            .saturating_add(T::DbWeight::get().writes(1 as Weight))
-    }
 }
-- 
GitLab