diff --git a/prdoc/pr_7124.prdoc b/prdoc/pr_7124.prdoc new file mode 100644 index 0000000000000..64118f3bdce81 --- /dev/null +++ b/prdoc/pr_7124.prdoc @@ -0,0 +1,9 @@ +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 diff --git a/substrate/frame/nft-fractionalization/src/lib.rs b/substrate/frame/nft-fractionalization/src/lib.rs index 5fa990ecebe66..7259d38061985 100644 --- a/substrate/frame/nft-fractionalization/src/lib.rs +++ b/substrate/frame/nft-fractionalization/src/lib.rs @@ -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 = 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, AssetBalanceOf, DepositOf, T::AccountId>> { + NftToAsset::::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)