diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index c2d51ffc82dce..39468160c4b50 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -28,7 +28,6 @@ frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = " frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" } frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" } pallet-balances = { version = "4.0.0-dev", default-features = false, path = "../balances" } -orml-tokens = { git = 'https://github.com/mangata-finance/open-runtime-module-library', default-features = false, branch="mangata-dev-v4" } [dev-dependencies] sp-io = { version = "4.0.0-dev", path = "../../primitives/io" } @@ -45,7 +44,6 @@ std = [ "frame-support/std", "frame-system/std", "pallet-balances/std", - "orml-tokens/std", ] runtime-benchmarks = [ "frame-benchmarking", diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 8c6a34ea90711..646baa99b99b0 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -74,15 +74,13 @@ use sp_std::prelude::*; use frame_support::{ print, traits::{ - Currency, ExistenceRequirement::KeepAlive, Get, Imbalance, Instance, OnUnbalanced, - ReservableCurrency, TryDrop, WithdrawReasons, + Currency, ExistenceRequirement::KeepAlive, Get, Imbalance, OnUnbalanced, + ReservableCurrency, WithdrawReasons, }, weights::Weight, PalletId, }; -use orml_tokens::{MultiTokenCurrency, MultiTokenCurrencyAdapter, MultiTokenNegativeImbalance}; - pub use pallet::*; pub use weights::WeightInfo; @@ -503,32 +501,3 @@ impl, I: 'static> OnUnbalanced> for Palle Self::deposit_event(Event::Deposit(numeric_amount)); } } - -pub struct MultiOnUnbalancedWrapper { - _marker: sp_std::marker::PhantomData, -} - -impl OnUnbalanced> - for MultiOnUnbalancedWrapper> -where - T: Config, - I: 'static, - Tokens: orml_tokens::Config, - Tokens::AccountId: From, - >::Balance: From, - MultiTokenNegativeImbalance: TryDrop + Imbalance>, -{ - fn on_nonzero_unbalanced(amount: MultiTokenNegativeImbalance) { - let numeric_amount = amount.peek().into(); - let currency_id = amount.0; - - // Must resolve into existing but better to be safe. - let _ = MultiTokenCurrencyAdapter::::resolve_creating( - currency_id, - &Pallet::::account_id().into(), - amount, - ); - - Pallet::::deposit_event(Event::Deposit(numeric_amount)); - } -}