Skip to content

Commit e3e6a5b

Browse files
authored
Deprecate FunctionOf and remove its users (#6340)
* Deprecate FunctionOf and remove users * Remove unused import
1 parent e163c39 commit e3e6a5b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ use codec::{Encode, Decode};
160160

161161
use frame_support::{
162162
decl_module, decl_event, decl_storage, decl_error, ensure,
163-
Parameter, RuntimeDebug, weights::{GetDispatchInfo, FunctionOf, Pays},
163+
Parameter, RuntimeDebug, weights::GetDispatchInfo,
164164
traits::{Currency, ReservableCurrency, Get, BalanceStatus},
165165
dispatch::PostDispatchInfo,
166166
};
@@ -336,11 +336,7 @@ decl_module! {
336336
/// - The weight of the `call` + 10,000.
337337
/// - One storage lookup to check account is recovered by `who`. O(1)
338338
/// # </weight>
339-
#[weight = FunctionOf(
340-
|args: (&T::AccountId, &Box<<T as Trait>::Call>)| args.1.get_dispatch_info().weight + 10_000,
341-
|args: (&T::AccountId, &Box<<T as Trait>::Call>)| args.1.get_dispatch_info().class,
342-
Pays::Yes,
343-
)]
339+
#[weight = (call.get_dispatch_info().weight + 10_000, call.get_dispatch_info().class)]
344340
fn as_recovered(origin,
345341
account: T::AccountId,
346342
call: Box<<T as Trait>::Call>

0 commit comments

Comments
 (0)