Disallow burning externally locked nfts (#13054)

* Disallow burning externally locked nfts

* Update docs
This commit is contained in:
Jegor Sidorenko
2023-01-04 10:30:43 +02:00
committed by GitHub
parent ae72d1cdf9
commit 25b4f8c688
4 changed files with 8 additions and 2 deletions
@@ -91,6 +91,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
item: T::ItemId,
with_details: impl FnOnce(&ItemDetailsFor<T, I>) -> DispatchResult,
) -> DispatchResult {
ensure!(!T::Locker::is_locked(collection, item), Error::<T, I>::ItemLocked);
let owner = Collection::<T, I>::try_mutate(
&collection,
|maybe_collection_details| -> Result<T::AccountId, DispatchError> {