git.delta.rocks / unique-network / refs/commits / 5539af3aa761

difftreelog

fix(rmrk) non-mapped collections and property error

Daniel Shiposha2022-06-06parent: #2ef3805.patch.diff
in: master

1 file changed

modifiedpallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth
657 Some(nft_id) => {657 Some(nft_id) => {
658 let token_id: TokenId = nft_id.into();658 let token_id: TokenId = nft_id.into();
659659
660 Self::ensure_nft_owner(collection_id, token_id, &sender, &budget)?;
661 Self::ensure_nft_type(collection_id, token_id, NftType::Regular)?;660 Self::ensure_nft_type(collection_id, token_id, NftType::Regular)?;
661 Self::ensure_nft_owner(collection_id, token_id, &sender, &budget)?;
662662
663 <PalletNft<T>>::set_scoped_token_property(663 <PalletNft<T>>::set_scoped_token_property(
664 collection_id,664 collection_id,
1120 rmrk_collection_id: RmrkCollectionId,1120 rmrk_collection_id: RmrkCollectionId,
1121 collection_type: misc::CollectionType,1121 collection_type: misc::CollectionType,
1122 ) -> Result<(NonfungibleHandle<T>, CollectionId), DispatchError> {1122 ) -> Result<(NonfungibleHandle<T>, CollectionId), DispatchError> {
1123 let unique_collection_id = Self::unique_collection_id(rmrk_collection_id)?;1123 let unique_collection_id = match collection_type {
1124 misc::CollectionType::Regular => Self::unique_collection_id(rmrk_collection_id)?,
1125 _ => rmrk_collection_id.into()
1126 };
11241127
1125 let collection = Self::get_typed_nft_collection(unique_collection_id, collection_type)?;1128 let collection = Self::get_typed_nft_collection(unique_collection_id, collection_type)?;
11261129
1183 token_id,1186 token_id,
1184 None,1187 None,
1185 nesting_budget,1188 nesting_budget,
1186 )?;1189 ).map_err(Self::map_unique_err_to_proxy)?;
11871190
1188 ensure!(is_owned, <Error<T>>::NoPermission);1191 ensure!(is_owned, <Error<T>>::NoPermission);
11891192