difftreelog
fix(rmrk) map CollectionNotEmpty error
in: master
2 files changed
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth204 misc::CollectionType::Regular,204 misc::CollectionType::Regular,205 )?;205 )?;206207 ensure!(208 collection.total_supply() == 0,209 <Error<T>>::CollectionNotEmpty210 );211206212 <PalletNft<T>>::destroy_collection(collection, &cross_sender)207 <PalletNft<T>>::destroy_collection(collection, &cross_sender)213 .map_err(Self::map_unique_err_to_proxy)?;208 .map_err(Self::map_unique_err_to_proxy)?;1142 CommonError::PublicMintingNotAllowed => NoPermission,1137 CommonError::PublicMintingNotAllowed => NoPermission,1143 CommonError::TokenNotFound => NoAvailableNftId,1138 CommonError::TokenNotFound => NoAvailableNftId,1144 CommonError::ApprovedValueTooLow => NoPermission,1139 CommonError::ApprovedValueTooLow => NoPermission,1140 CommonError::CantDestroyNotEmptyCollection => CollectionNotEmpty,1145 StructureError::TokenNotFound => NoAvailableNftId,1141 StructureError::TokenNotFound => NoAvailableNftId,1146 StructureError::OuroborosDetected => CannotSendToDescendentOrSelf1142 StructureError::OuroborosDetected => CannotSendToDescendentOrSelf,1147 }1143 }1148 }1144 }1149 }1145 }pallets/proxy-rmrk-core/src/misc.rsdiffbeforeafterboth--- 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<T>>::$unique_err.into() {
return <Error<T>>::$proxy_err.into()