git.delta.rocks / unique-network / refs/commits / 10c381b42680

difftreelog

Fix merge problems

Greg Zaitsev2020-07-30parent: #5b6d2a3.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
221 decimal_points: decimal_points,221 decimal_points: decimal_points,
222 token_prefix: prefix,222 token_prefix: prefix,
223 next_item_id: next_id,223 next_item_id: next_id,
224 custom_data_size: custom_data_sz,224 custom_data_size: custom_data_size,
225 sponsor: T::AccountId::default(),225 sponsor: T::AccountId::default(),
226 unconfirmed_sponsor: T::AccountId::default(),226 unconfirmed_sponsor: T::AccountId::default(),
227 };227 };
347
348
349 #[weight = 0]347 #[weight = 0]
350 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>) -> DispatchResult {348 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>, owner: T::AccountId) -> DispatchResult {
351349
352 let sender = ensure_signed(origin)?;350 let sender = ensure_signed(origin)?;
353351
736 // Determine who is paying transaction fee based on ecnomic model734 // Determine who is paying transaction fee based on ecnomic model
737 // Parse call to extract collection ID and access collection sponsor735 // Parse call to extract collection ID and access collection sponsor
738 let sponsor: T::AccountId = match call.is_sub_type() {736 let sponsor: T::AccountId = match call.is_sub_type() {
739 Some(Call::create_item(collection_id, _properties)) => {737 Some(Call::create_item(collection_id, _properties, _owner)) => {
740 <Collection<T>>::get(collection_id).sponsor738 <Collection<T>>::get(collection_id).sponsor
741 },739 },
742 Some(Call::transfer(collection_id, _item_id, _new_owner)) => {740 Some(Call::transfer(_new_owner, collection_id, _item_id, _value)) => {
743 <Collection<T>>::get(collection_id).sponsor741 <Collection<T>>::get(collection_id).sponsor
744 },742 },
745743