mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
pallet-uniques/nfts: Small optimizations (#2754)
Use `contains_key` to not require decoding the actual value.
This commit is contained in:
@@ -1433,8 +1433,8 @@ pub mod pallet {
|
||||
maybe_collection: Option<T::CollectionId>,
|
||||
) -> DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
let old = OwnershipAcceptance::<T, I>::get(&who);
|
||||
match (old.is_some(), maybe_collection.is_some()) {
|
||||
let exists = OwnershipAcceptance::<T, I>::contains_key(&who);
|
||||
match (exists, maybe_collection.is_some()) {
|
||||
(false, true) => {
|
||||
frame_system::Pallet::<T>::inc_consumers(&who)?;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user