difftreelog
Small fixes
in: master
2 files changed
pallets/nft/src/lib.rsdiffbeforeafterboth--- 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);
pallets/nft/src/mock.rsdiffbeforeafterboth102type Timestamp = pallet_timestamp::Pallet<Test>;102type Timestamp = pallet_timestamp::Pallet<Test>;103type Randomness = pallet_randomness_collective_flip::Pallet<Test>;103type Randomness = pallet_randomness_collective_flip::Pallet<Test>;104105// parameter_types! {106// pub const TombstoneDeposit: u64 = 1;107// pub const DepositPerContract: u64 = 1;108// pub const DepositPerStorageByte: u64 = 1;109// pub const DepositPerStorageItem: u64 = 1;110// pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * 24 * 60 * 10);111// pub const SurchargeReward: u64 = 1;112// pub const SignedClaimHandicap: u32 = 2;113// pub DeletionWeightLimit: u64 = u64::MAX;//Perbill::from_percent(10);114// pub DeletionQueueDepth: u32 = 10;115// pub Schedule: pallet_contracts::Schedule<Test> = Default::default();116// }117118// impl pallet_contracts::Config for Test {119// type Time = Timestamp;120// type Randomness = Randomness;121// type Currency = pallet_balances::Pallet<Test>;122// type Event = ();123// type RentPayment = ();124// type SignedClaimHandicap = SignedClaimHandicap;125// type TombstoneDeposit = TombstoneDeposit;126// type DepositPerContract = DepositPerContract;127// type DepositPerStorageByte = DepositPerStorageByte;128// type DepositPerStorageItem = DepositPerStorageItem;129// type RentFraction = RentFraction;130// type SurchargeReward = SurchargeReward;131// type DeletionWeightLimit = DeletionWeightLimit;132// type DeletionQueueDepth = DeletionQueueDepth;133// type ChainExtension = ();134// type WeightPrice = ();135// type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;136// type Schedule = Schedule;137// type CallStack = [pallet_contracts::Frame<Self>; 31];138// }139104140parameter_types! {105parameter_types! {141 pub const CollectionCreationPrice: u32 = 0;106 pub const CollectionCreationPrice: u32 = 0;