git.delta.rocks / unique-network / refs/commits / 4e0b740f5ec1

difftreelog

fix remove properties when item destroyed

Daniel Shiposha2022-05-18parent: #30e6f4b.patch.diff
in: master

2 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
762 <AdminAmount<T>>::remove(collection.id);762 <AdminAmount<T>>::remove(collection.id);
763 <IsAdmin<T>>::remove_prefix((collection.id,), None);763 <IsAdmin<T>>::remove_prefix((collection.id,), None);
764 <Allowlist<T>>::remove_prefix((collection.id,), None);764 <Allowlist<T>>::remove_prefix((collection.id,), None);
765 <CollectionProperties<T>>::remove(collection.id);
765766
766 <Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));767 <Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));
767 Ok(())768 Ok(())
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -257,6 +257,7 @@
 		<Owned<T>>::remove((collection.id, &token_data.owner, token));
 		<TokensBurnt<T>>::insert(collection.id, burnt);
 		<TokenData<T>>::remove((collection.id, token));
+		<TokenProperties<T>>::remove((collection.id, token));
 		let old_spender = <Allowance<T>>::take((collection.id, token));
 
 		if let Some(old_spender) = old_spender {