Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
less indirections (#13012)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilescope authored Dec 23, 2022
1 parent 9bd3d21 commit 97a0992
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frame/dex/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use frame_support::{
assert_ok,
storage::bounded_vec::BoundedVec,
traits::{
fungible::Unbalanced,
fungible::{Inspect, Unbalanced},
fungibles::{Create, Mutate},
},
};
Expand Down Expand Up @@ -55,7 +55,7 @@ where
let caller: T::AccountId = whitelisted_caller();
let caller_lookup = T::Lookup::unlookup(caller.clone());
if let MultiAssetId::Asset(asset_id) = asset {
assert_ok!(T::Currency::set_balance(&caller, BalanceOf::<T>::max_value()));
assert_ok!(T::Currency::set_balance(&caller, <T::Currency as Inspect<T::AccountId>>::Balance::max_value()));
assert_ok!(T::Assets::create(asset_id, caller.clone(), true, 1.into()));
assert_ok!(T::Assets::mint_into(asset_id, &caller, INITIAL_ASSET_BALANCE.into()));
}
Expand Down
4 changes: 0 additions & 4 deletions frame/dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ pub mod pallet {
type WeightInfo: WeightInfo;
}

pub type BalanceOf<T> = <<T as Config>::Currency as InspectFungible<
<T as frame_system::Config>::AccountId,
>>::Balance;

pub type AssetBalanceOf<T> =
<<T as Config>::Assets as Inspect<<T as frame_system::Config>::AccountId>>::Balance;

Expand Down

0 comments on commit 97a0992

Please sign in to comment.