git.delta.rocks / unique-network / refs/commits / 413ee1397f1d

difftreelog

chore cargo fmt

Grigoriy Simonov2022-09-27parent: #624d281.patch.diff
in: master

4 files changed

modifiedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/lib.rs
+++ b/pallets/foreign-assets/src/lib.rs
@@ -310,11 +310,8 @@
 				..Default::default()
 			};
 			let owner = T::CrossAccountId::from_sub(owner);
-			let bounded_collection_id = <PalletFungible<T>>::init_foreign_collection(
-				owner.clone(),
-				owner,
-				data,
-			)?;
+			let bounded_collection_id =
+				<PalletFungible<T>>::init_foreign_collection(owner.clone(), owner, data)?;
 			let foreign_asset_id =
 				Self::do_register_foreign_asset(&location, &metadata, bounded_collection_id)?;
 
modifiedpallets/proxy-rmrk-equip/src/lib.rsdiffbeforeafterboth
--- a/pallets/proxy-rmrk-equip/src/lib.rs
+++ b/pallets/proxy-rmrk-equip/src/lib.rs
@@ -250,8 +250,12 @@
 				..Default::default()
 			};
 
-			let collection_id_res =
-				<PalletNft<T>>::init_collection(cross_sender.clone(), cross_sender.clone(), data, true);
+			let collection_id_res = <PalletNft<T>>::init_collection(
+				cross_sender.clone(),
+				cross_sender.clone(),
+				data,
+				true,
+			);
 
 			if let Err(DispatchError::Arithmetic(_)) = &collection_id_res {
 				return Err(<Error<T>>::NoAvailableBaseId.into());
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
318 Ok(false)326 Ok(false)
319 }327 }
328
329 fn collection_creation_fee(&self) -> Result<value> {
330 let price: u128 = T::CollectionCreationPrice::get()
331 .try_into()
332 .map_err(|_| ()) // workaround for `expect` requiring `Debug` trait
333 .expect("Collection creation price should be convertible to u128");
334 Ok(price.into())
335 }
320}336}
321337
322/// Implements [`OnMethodCall`], which delegates call to [`EvmCollectionHelpers`]338/// Implements [`OnMethodCall`], which delegates call to [`EvmCollectionHelpers`]
modifiedruntime/common/dispatch.rsdiffbeforeafterboth
--- a/runtime/common/dispatch.rs
+++ b/runtime/common/dispatch.rs
@@ -59,7 +59,9 @@
 		data: CreateCollectionData<T::AccountId>,
 	) -> Result<CollectionId, DispatchError> {
 		let id = match data.mode {
-			CollectionMode::NFT => <PalletNonfungible<T>>::init_collection(sender, payer, data, false)?,
+			CollectionMode::NFT => {
+				<PalletNonfungible<T>>::init_collection(sender, payer, data, false)?
+			}
 			CollectionMode::Fungible(decimal_points) => {
 				// check params
 				ensure!(