difftreelog
Cargo fmt
in: master
3 files changed
pallets/common/src/erc.rsdiffbeforeafterboth484849#[solidity_interface(name = "Collection")]49#[solidity_interface(name = "Collection")]50impl<T: Config> CollectionHandle<T> 50impl<T: Config> CollectionHandle<T>51// where 51// where52// T::AccountId: From<H256>52// T::AccountId: From<H256>53{53{54 fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {54 fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -82,8 +82,14 @@
.map_err(|_| "key too long")?;
let value = value.try_into().map_err(|_| "value too long")?;
- <Pallet<T>>::set_token_property(self, &caller, TokenId(token_id), Property { key, value }, false)
- .map_err(dispatch_to_evm::<T>)
+ <Pallet<T>>::set_token_property(
+ self,
+ &caller,
+ TokenId(token_id),
+ Property { key, value },
+ false,
+ )
+ .map_err(dispatch_to_evm::<T>)
}
fn delete_property(&mut self, token_id: uint256, caller: caller, key: string) -> Result<()> {
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -449,7 +449,13 @@
property: Property,
is_token_create: bool,
) -> DispatchResult {
- Self::check_token_change_permission(collection, sender, token_id, &property.key, is_token_create)?;
+ Self::check_token_change_permission(
+ collection,
+ sender,
+ token_id,
+ &property.key,
+ is_token_create,
+ )?;
<TokenProperties<T>>::try_mutate((collection.id, token_id), |properties| {
let property = property.clone();