From 58d5f9ecaf1df0de773fdaab1b6b60af88829606 Mon Sep 17 00:00:00 2001 From: str-mv Date: Tue, 13 Jul 2021 16:28:27 +0000 Subject: [PATCH] Small fixes --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -942,10 +942,10 @@ #[transactional] pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult { - let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?); + let sender = ensure_signed(origin)?; let mut target_collection = Self::get_collection(collection_id)?; - Self::check_owner_permissions(&target_collection, sender.as_sub())?; + Self::check_owner_permissions(&target_collection, &sender)?; target_collection.transfers_enabled = value; Self::save_collection(target_collection); --- a/pallets/nft/src/mock.rs +++ b/pallets/nft/src/mock.rs @@ -102,41 +102,6 @@ type Timestamp = pallet_timestamp::Pallet; type Randomness = pallet_randomness_collective_flip::Pallet; -// parameter_types! { -// pub const TombstoneDeposit: u64 = 1; -// pub const DepositPerContract: u64 = 1; -// pub const DepositPerStorageByte: u64 = 1; -// pub const DepositPerStorageItem: u64 = 1; -// pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * 24 * 60 * 10); -// pub const SurchargeReward: u64 = 1; -// pub const SignedClaimHandicap: u32 = 2; -// pub DeletionWeightLimit: u64 = u64::MAX;//Perbill::from_percent(10); -// pub DeletionQueueDepth: u32 = 10; -// pub Schedule: pallet_contracts::Schedule = Default::default(); -// } - -// impl pallet_contracts::Config for Test { -// type Time = Timestamp; -// type Randomness = Randomness; -// type Currency = pallet_balances::Pallet; -// type Event = (); -// type RentPayment = (); -// type SignedClaimHandicap = SignedClaimHandicap; -// type TombstoneDeposit = TombstoneDeposit; -// type DepositPerContract = DepositPerContract; -// type DepositPerStorageByte = DepositPerStorageByte; -// type DepositPerStorageItem = DepositPerStorageItem; -// type RentFraction = RentFraction; -// type SurchargeReward = SurchargeReward; -// type DeletionWeightLimit = DeletionWeightLimit; -// type DeletionQueueDepth = DeletionQueueDepth; -// type ChainExtension = (); -// type WeightPrice = (); -// type WeightInfo = pallet_contracts::weights::SubstrateWeight; -// type Schedule = Schedule; -// type CallStack = [pallet_contracts::Frame; 31]; -// } - parameter_types! { pub const CollectionCreationPrice: u32 = 0; pub TreasuryAccountId: u64 = 1234; -- gitstuff