git.delta.rocks / unique-network / refs/commits / e5c8c500e665

difftreelog

minor: Fix tokenURI logic.

Trubnikov Sergey2022-07-19parent: #bc7b16c.patch.diff
in: master

1 file changed

modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
238 }238 }
239 } else if !is_erc721() {239 } else if !is_erc721() {
240 return Err("tokenURI not set".into());240 return Err("tokenURI not set".into());
241 }241 } else if !is_erc721() {
242 return Err("tokenURI not set".into());
243 }
242244
243 if let Some(base_uri) =245 if let Some(base_uri) =
244 pallet_common::Pallet::<T>::get_collection_property(self.id, &base_uri_key())246 pallet_common::Pallet::<T>::get_collection_property(self.id, &base_uri_key())
497 token_id: uint256,499 token_id: uint256,
498 token_uri: string,500 token_uri: string,
499 ) -> Result<bool> {501 ) -> Result<bool> {
500 let key = url_key();502 let key = u_key();
501 let permission = get_token_permission::<T>(self.id, &key)?;503 let permission = get_token_permission::<T>(self.id, &key)?;
502 if !permission.collection_admin {504 if !permission.collection_admin {
503 return Err("Operation is not allowed".into());505 return Err("Operation is not allowed".into());