git.delta.rocks / unique-network / refs/commits / ad6ef77393cb

difftreelog

fix use set instead of mutate

Daniel Shiposha2023-01-12parent: #cd1a703.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
1236 }1236 }
1237 }1237 }
12381238
1239 <CollectionProperties<T>>::mutate(collection.id, |properties| {1239 <CollectionProperties<T>>::set(collection.id, stored_properties);
1240 *properties = stored_properties;
1241 });
12421240
1243 Ok(())1241 Ok(())
1244 }1242 }
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -682,9 +682,7 @@
 			);
 		}
 
-		<TokenProperties<T>>::mutate((collection.id, token_id), |properties| {
-			*properties = stored_properties;
-		});
+		<TokenProperties<T>>::set((collection.id, token_id), stored_properties);
 
 		Ok(())
 	}
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -611,9 +611,7 @@
 			);
 		}
 
-		<TokenProperties<T>>::mutate((collection.id, token_id), |properties| {
-			*properties = stored_properties;
-		});
+		<TokenProperties<T>>::set((collection.id, token_id), stored_properties);
 
 		Ok(())
 	}