Revert "Auto-incremental CollectionId (#11796)" (#12059)

This reverts commit 658b179686.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-08-19 15:15:57 +02:00
committed by GitHub
parent 9d75f3e3e7
commit b0ff805740
6 changed files with 121 additions and 234 deletions
-15
View File
@@ -88,12 +88,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
},
);
let next_id = collection.saturating_add(1u32.into());
CollectionAccount::<T, I>::insert(&owner, &collection, ());
NextCollectionId::<T, I>::set(next_id);
Self::deposit_event(Event::NextCollectionIdIncremented { next_id });
Self::deposit_event(event);
Ok(())
}
@@ -213,16 +208,6 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
Ok(())
}
#[cfg(any(test, feature = "runtime-benchmarks"))]
pub fn set_next_id(count: u32) {
NextCollectionId::<T, I>::set(count.into());
}
#[cfg(test)]
pub fn get_next_id() -> T::CollectionId {
NextCollectionId::<T, I>::get()
}
pub fn do_set_price(
collection: T::CollectionId,
item: T::ItemId,