Skip to content
Snippets Groups Projects
Unverified Commit 3798ff7f authored by Matteo Muraca's avatar Matteo Muraca Committed by GitHub
Browse files

Remove `pallet::getter` usage from `pallet-nft-fractionalization` (#7124)


Description
Part of #3326
As per title, `pallet::getter` usage has been removed from
`pallet-nft-fractionalization`.

---------

Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
parent 1bc6ca60
No related merge requests found
Pipeline #517558 waiting for manual action with stages
in 53 minutes and 8 seconds
title: Remove pallet::getter from pallet-nft-fractionalization
doc:
- audience: Runtime Dev
description: |
This PR removes all pallet::getter occurrences from pallet-nft-fractionalization and replaces them with explicit implementations.
crates:
- name: pallet-nft-fractionalization
bump: major
......@@ -159,7 +159,6 @@ pub mod pallet {
/// Keeps track of the corresponding NFT ID, asset ID and amount minted.
#[pallet::storage]
#[pallet::getter(fn nft_to_asset)]
pub type NftToAsset<T: Config> = StorageMap<
_,
Blake2_128Concat,
......@@ -338,6 +337,13 @@ pub mod pallet {
T::PalletId::get().into_account_truncating()
}
/// Keeps track of the corresponding NFT ID, asset ID and amount minted.
pub fn nft_to_asset(
key: (T::NftCollectionId, T::NftId),
) -> Option<Details<AssetIdOf<T>, AssetBalanceOf<T>, DepositOf<T>, T::AccountId>> {
NftToAsset::<T>::get(key)
}
/// Prevent further transferring of NFT.
fn do_lock_nft(nft_collection_id: T::NftCollectionId, nft_id: T::NftId) -> DispatchResult {
T::Nfts::disable_transfer(&nft_collection_id, &nft_id)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment