From 175b00bb478d542fa1a63d31f72927727ecc094f Mon Sep 17 00:00:00 2001 From: str-mv Date: Tue, 04 Aug 2020 11:19:04 +0000 Subject: [PATCH] Remove duplicate methods --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -537,56 +537,6 @@ Ok(()) } - - // Shonsorship methods - #[weight = 0] - pub fn set_collection_sponsor( - origin, - collection_id: u64, - address: T::AccountId - ) -> DispatchResult { - let sender = ensure_signed(origin)?; - Self::check_owner_permissions(collection_id, sender)?; - let mut collection = >::get(collection_id); - collection.unconfirmed_sponsor = address; - >::insert(collection_id, collection); - - Ok(()) - } - - #[weight = 0] - pub fn confirm_sponsorship( - origin, - collection_id: u64, - address: T::AccountId - ) -> DispatchResult { - let sender = ensure_signed(origin)?; - let mut collection = >::get(collection_id); - - ensure!(collection.unconfirmed_sponsor == sender, "Only sponsor can confirm sponsorship"); - - collection.sponsor = collection.unconfirmed_sponsor; - collection.unconfirmed_sponsor = T::AccountId::default(); - >::insert(collection_id, collection); - - Ok(()) - } - - #[weight = 0] - pub fn remove_collection_sponsor( - origin, - collection_id: u64 - ) -> DispatchResult { - let sender = ensure_signed(origin)?; - Self::check_owner_permissions(collection_id, sender)?; - let mut collection = >::get(collection_id); - collection.unconfirmed_sponsor = T::AccountId::default(); - collection.sponsor = T::AccountId::default(); - >::insert(collection_id, collection); - - Ok(()) - } - } } -- gitstuff