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
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -762,6 +762,7 @@
 		<AdminAmount<T>>::remove(collection.id);
 		<IsAdmin<T>>::remove_prefix((collection.id,), None);
 		<Allowlist<T>>::remove_prefix((collection.id,), None);
+		<CollectionProperties<T>>::remove(collection.id);
 
 		<Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));
 		Ok(())
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
257 <Owned<T>>::remove((collection.id, &token_data.owner, token));257 <Owned<T>>::remove((collection.id, &token_data.owner, token));
258 <TokensBurnt<T>>::insert(collection.id, burnt);258 <TokensBurnt<T>>::insert(collection.id, burnt);
259 <TokenData<T>>::remove((collection.id, token));259 <TokenData<T>>::remove((collection.id, token));
260 <TokenProperties<T>>::remove((collection.id, token));
260 let old_spender = <Allowance<T>>::take((collection.id, token));261 let old_spender = <Allowance<T>>::take((collection.id, token));
261262
262 if let Some(old_spender) = old_spender {263 if let Some(old_spender) = old_spender {