difftreelog
Apply suggestions from code review
in: master
3 files changed
pallets/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;
}
pallets/nonfungible/src/erc.rsdiffbeforeafterboth470 }470 }471471472 /// @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 Operator475 /// @param approved Is operator enabled or disabled475 /// @param approved Is operator enabled or disabled476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]pallets/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.