diff --git a/pallets/channel-commission/src/mock.rs b/pallets/channel-commission/src/mock.rs index 90270b949b..6a9b86b4f6 100644 --- a/pallets/channel-commission/src/mock.rs +++ b/pallets/channel-commission/src/mock.rs @@ -32,9 +32,7 @@ use frame_support::{ }; use frame_system::EnsureSignedBy; use sp_core::ConstU32; -use sp_runtime::traits::Scale; use sp_runtime::{traits::AccountIdConversion, AccountId32, BuildStorage, DispatchError}; -use std::ops::Div; pub type BlockNumber = u64; pub type Amount = i128; @@ -185,7 +183,7 @@ impl VtokenMintingInterface for SimpleVtokenMint _vtoken_id: CurrencyId, token_amount: Balance, ) -> Result { - Ok(token_amount.div(2u64)) + Ok(token_amount.checked_div(2u64).unwrap()) } fn get_currency_amount_by_v_currency_amount(