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
472 u128,472 u128,
473 ),473 ),
474474
475 /// Amount pieces of token owned by `sender` was approved for `spender`.475 /// A `sender` approves operations on all owned tokens for `spender`.
476 ApprovedForAll(476 ApprovedForAll(
477 /// Id of collection to which item is belong.477 /// Id of collection to which item is belong.
478 CollectionId,478 CollectionId,
479 /// Owner of a wallet.479 /// Owner of a wallet.
480 T::CrossAccountId,480 T::CrossAccountId,
481 /// Id for which operator status was granted or rewoked.481 /// Id for which operator status was granted or rewoked.
482 T::CrossAccountId,482 T::CrossAccountId,
483 /// Is operator status was granted or rewoked.483 /// Is operator status granted or revoked?
484 bool,484 bool,
485 ),485 ),
486486
1847 /// An operator is allowed to transfer all tokens of the sender on their behalf.1847 /// An operator is allowed to transfer all tokens of the sender on their behalf.
1848 /// * `owner` - Token owner1848 /// * `owner` - Token owner
1849 /// * `operator` - Operator1849 /// * `operator` - Operator
1850 /// * `approve` - Is operator enabled or disabled1850 /// * `approve` - Should operator status be granted or revoked?
1851 fn set_approval_for_all(1851 fn set_approval_for_all(
1852 &self,1852 &self,
1853 owner: T::CrossAccountId,1853 owner: T::CrossAccountId,
1854 operator: T::CrossAccountId,1854 operator: T::CrossAccountId,
1855 approve: bool,1855 approve: bool,
1856 ) -> DispatchResultWithPostInfo;1856 ) -> DispatchResultWithPostInfo;
18571857
1858 /// Tells whether an operator is approved by a given owner.1858 /// Tells whether the given `owner` approves the `operator`.
1859 fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;1859 fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;
1860}1860}
18611861
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -470,7 +470,7 @@
 	}
 
 	/// @notice Sets or unsets the approval of a given operator.
-	///  An operator is allowed to transfer all tokens of the sender on their behalf.
+	/// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
 	/// @param operator Operator
 	/// @param approved Is operator enabled or disabled
 	#[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.