17
17
18
18
//! # Recovery Pallet
19
19
//!
20
- //! - [`recovery::Trait `](./trait.Trait .html)
20
+ //! - [`recovery::Config `](./trait.Config .html)
21
21
//! - [`Call`](./enum.Call.html)
22
22
//!
23
23
//! ## Overview
@@ -172,12 +172,12 @@ mod mock;
172
172
mod tests;
173
173
174
174
type BalanceOf < T > =
175
- <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
175
+ <<T as Config >:: Currency as Currency < <T as frame_system:: Config >:: AccountId > >:: Balance ;
176
176
177
177
/// Configuration trait.
178
- pub trait Trait : frame_system:: Trait {
178
+ pub trait Config : frame_system:: Config {
179
179
/// The overarching event type.
180
- type Event : From < Event < Self > > + Into < <Self as frame_system:: Trait >:: Event > ;
180
+ type Event : From < Event < Self > > + Into < <Self as frame_system:: Config >:: Event > ;
181
181
182
182
/// The overarching call type.
183
183
type Call : Parameter + Dispatchable < Origin =Self :: Origin , PostInfo =PostDispatchInfo > + GetDispatchInfo ;
@@ -237,7 +237,7 @@ pub struct RecoveryConfig<BlockNumber, Balance, AccountId> {
237
237
}
238
238
239
239
decl_storage ! {
240
- trait Store for Module <T : Trait > as Recovery {
240
+ trait Store for Module <T : Config > as Recovery {
241
241
/// The set of recoverable accounts and their recovery configuration.
242
242
pub Recoverable get( fn recovery_config) :
243
243
map hasher( twox_64_concat) T :: AccountId
@@ -262,7 +262,7 @@ decl_storage! {
262
262
decl_event ! {
263
263
/// Events type.
264
264
pub enum Event <T > where
265
- AccountId = <T as system:: Trait >:: AccountId ,
265
+ AccountId = <T as system:: Config >:: AccountId ,
266
266
{
267
267
/// A recovery process has been set up for an \[account\].
268
268
RecoveryCreated ( AccountId ) ,
@@ -284,7 +284,7 @@ decl_event! {
284
284
}
285
285
286
286
decl_error ! {
287
- pub enum Error for Module <T : Trait > {
287
+ pub enum Error for Module <T : Config > {
288
288
/// User is not allowed to make a call on behalf of this account
289
289
NotAllowed ,
290
290
/// Threshold must be greater than zero
@@ -321,7 +321,7 @@ decl_error! {
321
321
}
322
322
323
323
decl_module ! {
324
- pub struct Module <T : Trait > for enum Call where origin: T :: Origin {
324
+ pub struct Module <T : Config > for enum Call where origin: T :: Origin {
325
325
type Error = Error <T >;
326
326
327
327
/// The base amount of currency needed to reserve for creating a recovery configuration.
@@ -361,7 +361,7 @@ decl_module! {
361
361
) ]
362
362
fn as_recovered( origin,
363
363
account: T :: AccountId ,
364
- call: Box <<T as Trait >:: Call >
364
+ call: Box <<T as Config >:: Call >
365
365
) -> DispatchResult {
366
366
let who = ensure_signed( origin) ?;
367
367
// Check `who` is allowed to make a call on behalf of `account`
@@ -677,7 +677,7 @@ decl_module! {
677
677
}
678
678
}
679
679
680
- impl < T : Trait > Module < T > {
680
+ impl < T : Config > Module < T > {
681
681
/// Check that friends list is sorted and has no duplicates.
682
682
fn is_sorted_and_unique ( friends : & Vec < T :: AccountId > ) -> bool {
683
683
friends. windows ( 2 ) . all ( |w| w[ 0 ] < w[ 1 ] )
0 commit comments