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

difftreelog

Apply suggestions from code review

Gregory Simonov2022-12-06parent: #01e5c45.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -472,7 +472,7 @@
 			u128,
 		),
 
-		/// Amount pieces of token owned by `sender` was approved for `spender`.
+		/// A `sender` approves operations on all owned tokens for `spender`.
 		ApprovedForAll(
 			/// Id of collection to which item is belong.
 			CollectionId,
@@ -480,7 +480,7 @@
 			T::CrossAccountId,
 			/// Id for which operator status was granted or rewoked.
 			T::CrossAccountId,
-			/// Is operator status was granted or rewoked.
+			/// Is operator status granted or revoked?
 			bool,
 		),
 
@@ -1847,7 +1847,7 @@
 	/// An operator is allowed to transfer all tokens of the sender on their behalf.
 	/// * `owner` - Token owner
 	/// * `operator` - Operator
-	/// * `approve` - Is operator enabled or disabled
+	/// * `approve` - Should operator status be granted or revoked?
 	fn set_approval_for_all(
 		&self,
 		owner: T::CrossAccountId,
@@ -1855,7 +1855,7 @@
 		approve: bool,
 	) -> DispatchResultWithPostInfo;
 
-	/// Tells whether an operator is approved by a given owner.
+	/// Tells whether the given `owner` approves the `operator`.
 	fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;
 }
 
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
470 }470 }
471471
472 /// @notice Sets or unsets the approval of a given operator.472 /// @notice Sets or unsets the approval of a given operator.
473 /// An operator is allowed to transfer all tokens of the sender on their behalf.473 /// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
474 /// @param operator Operator474 /// @param operator Operator
475 /// @param approved Is operator enabled or disabled475 /// @param approved Is operator enabled or disabled
476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -281,7 +281,7 @@
 			Key<Blake2_128Concat, T::CrossAccountId>,
 		),
 		Value = bool,
-		QueryKind = OptionQuery,
+		QueryKind = ValueQuery,
 	>;
 
 	/// Upgrade from the old schema to properties.