Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit f34ce85

Browse files
committed
fix misnamed enums
1 parent 254ead7 commit f34ce85

File tree

1 file changed

+12
-13
lines changed
  • frame/elections-phragmen/src

1 file changed

+12
-13
lines changed

frame/elections-phragmen/src/lib.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ pub mod pallet {
195195
#[pallet::without_storage_info]
196196
pub struct Pallet<T>(PhantomData<T>);
197197

198+
// local lock id.
199+
// `#[pallet::composite]`
200+
enum LockId {
201+
CouncilVoting,
202+
OtherReason,
203+
}
204+
198205
#[pallet::config]
199206
pub trait Config: frame_system::Config {
200207
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
@@ -204,15 +211,14 @@ pub mod pallet {
204211
type PalletId: Get<LockIdentifier>;
205212

206213
/// This will come from the outer runtime, and it will be the amalgamated lock ids.
207-
type RuntimeLockIds: From<crate::pallet::LockIds>;
214+
type RuntimeLockIds: From<crate::pallet::LockId>;
208215

209216
/// The currency that people are electing with.
210217
type Currency: LockableCurrency<
211-
Self::AccountId,
212-
Moment = Self::BlockNumber,
213-
LockId = Self::RuntimeLockId
214-
>
215-
+ ReservableCurrency<Self::AccountId>;
218+
Self::AccountId,
219+
Moment = Self::BlockNumber,
220+
LockId = Self::RuntimeLockIds,
221+
> + ReservableCurrency<Self::AccountId>;
216222

217223
/// What to do when the members change.
218224
type ChangeMembers: ChangeMembers<Self::AccountId>;
@@ -368,13 +374,6 @@ pub mod pallet {
368374
},
369375
};
370376

371-
// local lock id.
372-
#[pallet::composite]
373-
enum LockId {
374-
CouncilVoting,
375-
OtherReason,
376-
}
377-
378377
let id: T::RuntimeLockIds = LockId::CouncilVoting.into();
379378

380379
// Amount to be locked up.

0 commit comments

Comments
 (0)