From 9d78c86ffab59240dc9abf46b943599945850d2c Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Thu, 25 Aug 2022 11:28:00 +0000 Subject: [PATCH] fmt --- --- a/pallets/common/src/erc.rs +++ b/pallets/common/src/erc.rs @@ -133,7 +133,11 @@ /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor. /// /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract. - fn set_collection_sponsor_substrate(&mut self, caller: caller, sponsor: uint256) -> Result { + fn set_collection_sponsor_substrate( + &mut self, + caller: caller, + sponsor: uint256, + ) -> Result { check_is_owner_or_admin(caller, self)?; let sponsor = convert_uint256_to_cross_account::(sponsor); @@ -144,7 +148,10 @@ // /// Whether there is a pending sponsor. fn has_collection_pending_sponsor(&self) -> Result { - Ok(matches!(self.collection.sponsorship, SponsorshipState::Unconfirmed(_))) + Ok(matches!( + self.collection.sponsorship, + SponsorshipState::Unconfirmed(_) + )) } /// Collection sponsorship confirmation. @@ -173,7 +180,9 @@ /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw. fn get_collection_sponsor(&self) -> Result<(address, uint256)> { let sponsor = match self.collection.sponsorship { - SponsorshipState::Disabled | SponsorshipState::Unconfirmed(_) => return Ok(Default::default()), + SponsorshipState::Disabled | SponsorshipState::Unconfirmed(_) => { + return Ok(Default::default()) + } SponsorshipState::Confirmed(ref sponsor) => sponsor, }; let sponsor = T::CrossAccountId::from_sub(sponsor.clone()); --- a/pallets/common/src/eth.rs +++ b/pallets/common/src/eth.rs @@ -60,7 +60,7 @@ } /// Convert `uint256` to `CrossAccountId`. -pub fn convert_uint256_to_cross_account(from: uint256) -> T::CrossAccountId +pub fn convert_uint256_to_cross_account(from: uint256) -> T::CrossAccountId where T::AccountId: From<[u8; 32]>, { --- a/pallets/evm-contract-helpers/src/eth.rs +++ b/pallets/evm-contract-helpers/src/eth.rs @@ -357,7 +357,7 @@ >::insert(contract_address, who.as_eth(), block_number); - Some(sponsor) + Some(sponsor) } } -- gitstuff