mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 18:21:08 +00:00
[NFTs] Fix consumers issue (#2653)
When we call the `set_accept_ownership` method, we increase the number of account consumers, but then we don't decrease it on collection transfer, which leads to the wrong consumers number an account has.
This commit is contained in:
@@ -1153,11 +1153,11 @@ pub mod pallet {
|
||||
pub fn transfer_ownership(
|
||||
origin: OriginFor<T>,
|
||||
collection: T::CollectionId,
|
||||
owner: AccountIdLookupOf<T>,
|
||||
new_owner: AccountIdLookupOf<T>,
|
||||
) -> DispatchResult {
|
||||
let origin = ensure_signed(origin)?;
|
||||
let owner = T::Lookup::lookup(owner)?;
|
||||
Self::do_transfer_ownership(origin, collection, owner)
|
||||
let new_owner = T::Lookup::lookup(new_owner)?;
|
||||
Self::do_transfer_ownership(origin, collection, new_owner)
|
||||
}
|
||||
|
||||
/// Change the Issuer, Admin and Freezer of a collection.
|
||||
|
||||
Reference in New Issue
Block a user