mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 21:35:44 +00:00
Improve NFT locking (#14510)
* Update docs * Prevent locking of the same NFT twice * Validate item is not locked on burn * Cover with tests * chore
This commit is contained in:
@@ -338,12 +338,12 @@ pub mod pallet {
|
||||
T::PalletId::get().into_account_truncating()
|
||||
}
|
||||
|
||||
/// Transfer the NFT from the account holding that NFT to the pallet's account.
|
||||
/// 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)
|
||||
}
|
||||
|
||||
/// Transfer the NFT to the account returning the tokens.
|
||||
/// Remove the transfer lock and transfer the NFT to the account returning the tokens.
|
||||
fn do_unlock_nft(
|
||||
nft_collection_id: T::NftCollectionId,
|
||||
nft_id: T::NftId,
|
||||
|
||||
Reference in New Issue
Block a user