difftreelog
feat(rmrk) mint_nft allows optional owner
in: master
1 file changed
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth350 #[pallet::weight(<SelfWeightOf<T>>::mint_nft(resources.as_ref().map(|r| r.len() as u32).unwrap_or(0)))]350 #[pallet::weight(<SelfWeightOf<T>>::mint_nft(resources.as_ref().map(|r| r.len() as u32).unwrap_or(0)))]351 pub fn mint_nft(351 pub fn mint_nft(352 origin: OriginFor<T>,352 origin: OriginFor<T>,353 owner: T::AccountId,353 owner: Option<T::AccountId>,354 collection_id: RmrkCollectionId,354 collection_id: RmrkCollectionId,355 recipient: Option<T::AccountId>,355 recipient: Option<T::AccountId>,356 royalty_amount: Option<Permill>,356 royalty_amount: Option<Permill>,361 let sender = ensure_signed(origin)?;361 let sender = ensure_signed(origin)?;362 let cross_sender = T::CrossAccountId::from_sub(sender.clone());362 let cross_sender = T::CrossAccountId::from_sub(sender.clone());363364 let owner = owner.unwrap_or(sender.clone());363 let cross_owner = T::CrossAccountId::from_sub(owner.clone());365 let cross_owner = T::CrossAccountId::from_sub(owner.clone());364366365 let collection = Self::get_typed_nft_collection(367 let collection = Self::get_typed_nft_collection(