Skip to content

Commit

Permalink
chore: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
chungquantin committed Jan 16, 2025
1 parent baba4b1 commit 48d7f91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pallets/api/src/nonfungibles/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ impl<T: Config> Pallet<T> {
/// - `collection` - The identifier of the collection.
/// - `maybe_item` - The optional item of the collection to be approved for delegated transfer.
/// If `None`, the approval applies to all `owner`'s collection items.
/// - `operator`: The account that will be allowed to take control of the specified item or all
/// owner's collection items.
/// - `operator`: The account to delegate permission to transfer a specified collection item or
/// all collection items owned by the `owner`.
pub(crate) fn do_approve(
owner: OriginFor<T>,
collection: CollectionIdOf<T>,
Expand Down Expand Up @@ -49,8 +49,8 @@ impl<T: Config> Pallet<T> {
/// - `maybe_item` - The optional item of the collection that the operator has an approval to
/// transfer. If not provided, an approval to transfer all `owner`'s collection items will be
/// cancelled.
/// - `operator` - The account that had permission to transfer the sepcified item or all owner's
/// collection items.
/// - `operator`: The account that had permission to transfer a specified collection item or all
/// collection items owned by the `owner`.
pub(crate) fn do_cancel_approval(
owner: OriginFor<T>,
collection: CollectionIdOf<T>,
Expand Down
8 changes: 4 additions & 4 deletions pallets/api/src/nonfungibles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ pub mod pallet {
/// collection item(s).
/// - `approved` - A boolean indicating the desired approval status:
/// - `true` to approve the `operator`.
/// - `false` to cancel the approval granted to the `operator`.
/// - `false` to cancel the approval delegated to the `operator`.
#[pallet::call_index(4)]
#[pallet::weight(
NftsWeightInfoOf::<T>::approve_transfer() +
NftsWeightInfoOf::<T>::approve_collection_transfer() +
NftsWeightInfoOf::<T>::cancel_collection_approval() +
NftsWeightInfoOf::<T>::cancel_approval()
NftsWeightInfoOf::<T>::cancel_approval()
)]
pub fn approve(
origin: OriginFor<T>,
Expand Down Expand Up @@ -578,9 +578,9 @@ pub mod pallet {
///
/// # Parameters
/// - `request` - The read request.
fn read(value: Self::Read) -> Self::Result {
fn read(request: Self::Read) -> Self::Result {
use Read::*;
match value {
match request {
TotalSupply(collection) => ReadResult::TotalSupply(
NftsOf::<T>::collection_items(collection).unwrap_or_default() as u128,
),
Expand Down

0 comments on commit 48d7f91

Please sign in to comment.