From d8e349d7a95fc25f7166e2052198b9c9c735ffd8 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 14 Sep 2022 08:32:32 +0000 Subject: [PATCH] impl_fungibles refactored --- --- a/pallets/foreign-assets/src/impl_fungibles.rs +++ b/pallets/foreign-assets/src/impl_fungibles.rs @@ -26,20 +26,13 @@ use up_data_structs::budget::Unlimited; use sp_runtime::traits::{CheckedAdd, CheckedSub}; -// type BalanceSelf = -// <::Currency as Currency<::AccountId>>::Balance; -type BalanceRelay = - <::Currency as Currency<::AccountId>>::Balance; - impl fungibles::Inspect<::AccountId> for Pallet where T: orml_tokens::Config, - BalanceRelay: From>, - BalanceOf: From>, - BalanceRelay: From<::Balance>, + BalanceOf: From<::Balance>, BalanceOf: From<::Balance>, - ::Balance: From>, - ::Balance: From>, + ::Balance: From>, + ::Balance: From>, { type AssetId = AssetIds; type Balance = BalanceOf; @@ -270,13 +263,11 @@ impl fungibles::Mutate<::AccountId> for Pallet where T: orml_tokens::Config, - BalanceRelay: From>, - BalanceOf: From>, - BalanceRelay: From<::Balance>, + BalanceOf: From<::Balance>, BalanceOf: From<::Balance>, - ::Balance: From>, - ::Balance: From>, - u128: From>, + ::Balance: From>, + ::Balance: From>, + u128: From>, { fn mint_into( asset: Self::AssetId, @@ -394,13 +385,11 @@ impl fungibles::Transfer for Pallet where T: orml_tokens::Config, - BalanceRelay: From>, - BalanceOf: From>, - BalanceRelay: From<::Balance>, + BalanceOf: From<::Balance>, BalanceOf: From<::Balance>, - ::Balance: From>, - ::Balance: From>, - u128: From>, + ::Balance: From>, + ::Balance: From>, + u128: From>, { fn transfer( asset: Self::AssetId, -- gitstuff