diff --git a/substrate/frame/opf/src/functions.rs b/substrate/frame/opf/src/functions.rs index b32cc978aa9f..9c5b750dab2a 100644 --- a/substrate/frame/opf/src/functions.rs +++ b/substrate/frame/opf/src/functions.rs @@ -129,14 +129,11 @@ impl Pallet { pub fn convert_balance(amount: BalanceOf) -> Option> { let value = match TryInto::::try_into(amount) { - Ok(val) => { - TryInto::>::try_into(val).ok() - }, - Err(e) => None + Ok(val) => TryInto::>::try_into(val).ok(), + Err(e) => None, }; value - } /// Funds transfer from the Pot to a project account pub fn spend(amount: BalanceOf, beneficiary: AccountIdOf) -> DispatchResult { diff --git a/substrate/frame/opf/src/types.rs b/substrate/frame/opf/src/types.rs index bc53b66ba21e..eb2043d6681f 100644 --- a/substrate/frame/opf/src/types.rs +++ b/substrate/frame/opf/src/types.rs @@ -23,7 +23,7 @@ pub use frame_support::{ dispatch::GetDispatchInfo, pallet_prelude::*, traits::{ - fungible, Currency, + fungible, fungible::{Inspect, InspectHold, Mutate, MutateHold}, fungibles, schedule::{ @@ -31,8 +31,8 @@ pub use frame_support::{ DispatchTime, MaybeHashed, }, tokens::{Precision, Preservation}, - Bounded, DefensiveOption, EnsureOrigin, LockIdentifier, OriginTrait, QueryPreimage, - StorePreimage, UnfilteredDispatchable, + Bounded, Currency, DefensiveOption, EnsureOrigin, LockIdentifier, OriginTrait, + QueryPreimage, StorePreimage, UnfilteredDispatchable, }, transactional, weights::{WeightMeter, WeightToFee}, @@ -53,7 +53,9 @@ pub type BalanceOf = <::NativeBalance as fungible::Inspect< ::AccountId, >>::Balance; -pub type BalanceOfD = <::Currency as Currency<::AccountId>>::Balance; +pub type BalanceOfD = <::Currency as Currency< + ::AccountId, +>>::Balance; pub type AccountIdOf = ::AccountId; /// A reward index. @@ -226,7 +228,3 @@ impl VotingRoundInfo { round_infos } } - - - -