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

less indirection #13012

Merged
merged 1 commit into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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