Revert "Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798)" (#12882)

This reverts commit 9a014d1ecd.
This commit is contained in:
Anthony Alaribe
2022-12-09 11:40:59 +02:00
committed by GitHub
parent 8a24e27377
commit 96902eae48
20 changed files with 105 additions and 135 deletions
+5 -6
View File
@@ -62,7 +62,7 @@ use frame_support::{
ensure,
storage::bounded_vec::BoundedVec,
traits::{
fungibles, fungibles::Lockable, Currency, ExistenceRequirement, Get, VestingSchedule,
Currency, ExistenceRequirement, Get, LockIdentifier, LockableCurrency, VestingSchedule,
WithdrawReasons,
},
weights::Weight,
@@ -83,12 +83,11 @@ pub use weights::WeightInfo;
type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance;
type MaxLocksOf<T> = <<T as Config>::Currency as fungibles::Lockable<
<T as frame_system::Config>::AccountId,
>>::MaxLocks;
type MaxLocksOf<T> =
<<T as Config>::Currency as LockableCurrency<<T as frame_system::Config>::AccountId>>::MaxLocks;
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
const VESTING_ID: fungibles::LockIdentifier = *b"vesting ";
const VESTING_ID: LockIdentifier = *b"vesting ";
// A value placed in storage that represents the current version of the Vesting storage.
// This value is used by `on_runtime_upgrade` to determine whether we run storage migration logic.
@@ -160,7 +159,7 @@ pub mod pallet {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
/// The currency trait.
type Currency: fungibles::Lockable<Self::AccountId>;
type Currency: LockableCurrency<Self::AccountId>;
/// Convert the block number into a balance.
type BlockNumberToBalance: Convert<Self::BlockNumber, BalanceOf<Self>>;