difftreelog
fix use CollectionUnknown instead of NotRmrkCollection
in: master
2 files changed
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth75 pub enum Error<T> {75 pub enum Error<T> {76 /* Unique-specific events */76 /* Unique-specific events */77 CorruptedCollectionType,77 CorruptedCollectionType,78 NotRmrkCollection,79 RmrkPropertyKeyIsTooLong,78 RmrkPropertyKeyIsTooLong,80 RmrkPropertyValueIsTooLong,79 RmrkPropertyValueIsTooLong,8180240 fn get_collection_type(collection_id: CollectionId) -> Result<CollectionType, DispatchError> {239 fn get_collection_type(collection_id: CollectionId) -> Result<CollectionType, DispatchError> {241 let collection_type: CollectionType = <PalletCommon<T>>::collection_properties(collection_id)240 let collection_type: CollectionType = <PalletCommon<T>>::collection_properties(collection_id)242 .get(&rmrk_property!(Config=T, CollectionType)?)241 .get(&rmrk_property!(Config=T, CollectionType)?)243 .ok_or(<Error<T>>::NotRmrkCollection)?242 .ok_or(<Error<T>>::CollectionUnknown)?244 .try_into()243 .try_into()245 .map_err(<Error<T>>::from)?;244 .map_err(<Error<T>>::from)?;246245pallets/proxy-rmrk-core/src/misc.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/misc.rs
+++ b/pallets/proxy-rmrk-core/src/misc.rs
@@ -48,7 +48,7 @@
fn into_nft_collection(self) -> Result<NonfungibleHandle<T>, Error<T>> {
match self.mode {
CollectionMode::NFT => Ok(NonfungibleHandle::cast(self)),
- _ => Err(<Error<T>>::NotRmrkCollection)
+ _ => Err(<Error<T>>::CollectionUnknown)
}
}
}