From 12a441c421f3ff602bd9bca29b0f1de8b2356255 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Tue, 26 Sep 2023 10:51:49 +0000 Subject: [PATCH] fix: debug check if new token doesnt have any properties --- --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -632,6 +632,10 @@ }); let stored_properties = if is_new_token { + debug_assert!(!>::contains_key(( + collection.id, + token_id + ))); TokenPropertiesT::new() } else { >::get((collection.id, token_id)) --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -575,6 +575,10 @@ }); let stored_properties = if is_new_token { + debug_assert!(!>::contains_key(( + collection.id, + token_id + ))); TokenPropertiesT::new() } else { >::get((collection.id, token_id)) -- gitstuff