@@ -195,6 +195,13 @@ pub mod pallet {
195
195
#[ pallet:: without_storage_info]
196
196
pub struct Pallet < T > ( PhantomData < T > ) ;
197
197
198
+ // local lock id.
199
+ // `#[pallet::composite]`
200
+ enum LockId {
201
+ CouncilVoting ,
202
+ OtherReason ,
203
+ }
204
+
198
205
#[ pallet:: config]
199
206
pub trait Config : frame_system:: Config {
200
207
type RuntimeEvent : From < Event < Self > > + IsType < <Self as frame_system:: Config >:: RuntimeEvent > ;
@@ -204,15 +211,14 @@ pub mod pallet {
204
211
type PalletId : Get < LockIdentifier > ;
205
212
206
213
/// 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 > ;
208
215
209
216
/// The currency that people are electing with.
210
217
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 > ;
216
222
217
223
/// What to do when the members change.
218
224
type ChangeMembers : ChangeMembers < Self :: AccountId > ;
@@ -368,13 +374,6 @@ pub mod pallet {
368
374
} ,
369
375
} ;
370
376
371
- // local lock id.
372
- #[ pallet:: composite]
373
- enum LockId {
374
- CouncilVoting ,
375
- OtherReason ,
376
- }
377
-
378
377
let id: T :: RuntimeLockIds = LockId :: CouncilVoting . into ( ) ;
379
378
380
379
// Amount to be locked up.
0 commit comments