git.delta.rocks / unique-network / refs/commits / 3e526984b971

difftreelog

fix missing error handler for create_item call

Yaroslav Bolyukin2021-05-07parent: #ba80c8c.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
1148 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);1148 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
1149 let collection = Self::get_collection(collection_id)?;1149 let collection = Self::get_collection(collection_id)?;
11501150
1151 Self::create_item_internal(&sender, &collection, &owner, data);1151 Self::create_item_internal(&sender, &collection, &owner, data)?;
11521152
1153 Self::submit_logs(collection)?;1153 Self::submit_logs(collection)?;
1154 Ok(())1154 Ok(())
2227 <CollectionById<T>>::insert(collection.id, collection.into_inner());2227 <CollectionById<T>>::insert(collection.id, collection.into_inner());
2228 }2228 }
22292229
2230 fn submit_logs(collection: CollectionHandle<T>) -> DispatchResult {2230 pub fn submit_logs(collection: CollectionHandle<T>) -> DispatchResult {
2231 if collection.logs.is_empty() {2231 if collection.logs.is_empty() {
2232 return Ok(())2232 return Ok(())
2233 }2233 }