Skip to content

Commit cbd8f73

Browse files
Migrate away from SimpleDispatchInfo (#5686)
* Migrate away from SimpleDispatchInfo * Fix imports * Better doc * Update lib.rs Co-authored-by: Shawn Tabrizi <[email protected]>
1 parent c8b22f3 commit cbd8f73

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use frame_support::weights::{Weight, MINIMUM_WEIGHT, DispatchClass, FunctionOf};
2929
use frame_support::traits::{Currency, WithdrawReason, ExistenceRequirement};
3030
use frame_system::{self as system, ensure_signed};
3131
use sp_runtime::ModuleId;
32-
use frame_support::weights::SimpleDispatchInfo;
3332
use sp_core::{U256, H256, H160, Hasher};
3433
use sp_runtime::{
3534
DispatchResult, traits::{UniqueSaturatedInto, AccountIdConversion, SaturatedConversion},
@@ -191,7 +190,7 @@ decl_module! {
191190
fn deposit_event() = default;
192191

193192
/// Deposit balance from currency/balances module into EVM.
194-
#[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
193+
#[weight = MINIMUM_WEIGHT]
195194
fn deposit_balance(origin, value: BalanceOf<T>) {
196195
let sender = ensure_signed(origin)?;
197196

@@ -212,7 +211,7 @@ decl_module! {
212211
}
213212

214213
/// Withdraw balance from EVM into currency/balances module.
215-
#[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
214+
#[weight = MINIMUM_WEIGHT]
216215
fn withdraw_balance(origin, value: BalanceOf<T>) {
217216
let sender = ensure_signed(origin)?;
218217
let address = T::ConvertAccountId::convert_account_id(&sender);

0 commit comments

Comments
 (0)