--- a/pallets/proxy-rmrk-core/src/lib.rs +++ b/pallets/proxy-rmrk-core/src/lib.rs @@ -204,11 +204,6 @@ misc::CollectionType::Regular, )?; - ensure!( - collection.total_supply() == 0, - >::CollectionNotEmpty - ); - >::destroy_collection(collection, &cross_sender) .map_err(Self::map_unique_err_to_proxy)?; @@ -1142,8 +1137,9 @@ CommonError::PublicMintingNotAllowed => NoPermission, CommonError::TokenNotFound => NoAvailableNftId, CommonError::ApprovedValueTooLow => NoPermission, + CommonError::CantDestroyNotEmptyCollection => CollectionNotEmpty, StructureError::TokenNotFound => NoAvailableNftId, - StructureError::OuroborosDetected => CannotSendToDescendentOrSelf + StructureError::OuroborosDetected => CannotSendToDescendentOrSelf, } } } --- a/pallets/proxy-rmrk-core/src/misc.rs +++ b/pallets/proxy-rmrk-core/src/misc.rs @@ -3,7 +3,7 @@ #[macro_export] macro_rules! map_unique_err_to_proxy { - (match $err:ident { $($unique_err_ty:ident :: $unique_err:ident => $proxy_err:ident),+ }) => { + (match $err:ident { $($unique_err_ty:ident :: $unique_err:ident => $proxy_err:ident),+ $(,)? }) => { $( if $err == <$unique_err_ty>::$unique_err.into() { return >::$proxy_err.into()