--- a/pallets/common/src/erc.rs +++ b/pallets/common/src/erc.rs @@ -87,13 +87,17 @@ check_is_owner(caller, self)?; let sponsor = T::CrossAccountId::from_eth(sponsor); - self.set_sponsor(sponsor.as_sub().clone()).map_err(dispatch_to_evm::)?; + self.set_sponsor(sponsor.as_sub().clone()) + .map_err(dispatch_to_evm::)?; save(self) } fn confirm_collection_sponsorship(&mut self, caller: caller) -> Result { let caller = T::CrossAccountId::from_eth(caller); - if !self.confirm_sponsorship(caller.as_sub()).map_err(dispatch_to_evm::)? { + if !self + .confirm_sponsorship(caller.as_sub()) + .map_err(dispatch_to_evm::)? + { return Err(Error::Revert("Caller is not set as sponsor".into())); } save(self) @@ -312,7 +316,9 @@ } fn save(collection: &CollectionHandle) -> Result { - collection.check_is_read_only().map_err(dispatch_to_evm::)?; + collection + .check_is_read_only() + .map_err(dispatch_to_evm::)?; >::insert(collection.id, collection.collection.clone()); Ok(()) } --- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -175,7 +175,7 @@ if self.read_only { return Err(>::CollectionNotFound)?; } - + Ok(()) } } --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -903,7 +903,7 @@ spender: Option<&T::CrossAccountId>, ) -> DispatchResult { collection.check_is_read_only()?; - + if collection.permissions.access() == AccessMode::AllowList { collection.check_allowlist(sender)?; if let Some(spender) = spender {