git.delta.rocks / unique-network / refs/commits / 58d5f9ecaf1d

difftreelog

Small fixes

str-mv2021-07-13parent: #9cafc6e.patch.diff
in: master

2 files changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
942 #[transactional]942 #[transactional]
943 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {943 pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {
944944
945 let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);945 let sender = ensure_signed(origin)?;
946 let mut target_collection = Self::get_collection(collection_id)?;946 let mut target_collection = Self::get_collection(collection_id)?;
947947
948 Self::check_owner_permissions(&target_collection, sender.as_sub())?;948 Self::check_owner_permissions(&target_collection, &sender)?;
949 949
950 target_collection.transfers_enabled = value;950 target_collection.transfers_enabled = value;
951 Self::save_collection(target_collection);951 Self::save_collection(target_collection);
modifiedpallets/nft/src/mock.rsdiffbeforeafterboth
--- a/pallets/nft/src/mock.rs
+++ b/pallets/nft/src/mock.rs
@@ -102,41 +102,6 @@
 type Timestamp = pallet_timestamp::Pallet<Test>;
 type Randomness = pallet_randomness_collective_flip::Pallet<Test>;
 
-// 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<Test> = Default::default();
-// }
-
-// impl pallet_contracts::Config for Test {
-// 	type Time = Timestamp;
-// 	type Randomness = Randomness;
-// 	type Currency = pallet_balances::Pallet<Test>;
-// 	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<Self>;
-// 	type Schedule = Schedule;
-// 	type CallStack = [pallet_contracts::Frame<Self>; 31];
-// }
-
 parameter_types! {
 	pub const CollectionCreationPrice: u32 = 0;
 	pub TreasuryAccountId: u64 = 1234;