diff --git a/tokens/src/impls.rs b/tokens/src/impls.rs index f5a53d52e..4c1b00dd8 100644 --- a/tokens/src/impls.rs +++ b/tokens/src/impls.rs @@ -48,11 +48,11 @@ where } } - fn can_deposit(asset: Self::AssetId, who: &AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence { + fn can_deposit(asset: Self::AssetId, who: &AccountId, amount: Self::Balance) -> DepositConsequence { if TestKey::contains(&asset) { - A::can_deposit(who, amount, mint) + A::can_deposit(who, amount) } else { - B::can_deposit(asset, who, amount, mint) + B::can_deposit(asset, who, amount) } } @@ -156,12 +156,11 @@ where ) } - fn can_deposit(who: &AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence { + fn can_deposit(who: &AccountId, amount: Self::Balance) -> DepositConsequence { T::can_deposit( GetCurrencyId::get(), who, C::convert_balance_back(amount, GetCurrencyId::get()), - mint, ) } diff --git a/tokens/src/lib.rs b/tokens/src/lib.rs index 13782f2c9..6d731bdf3 100644 --- a/tokens/src/lib.rs +++ b/tokens/src/lib.rs @@ -1677,7 +1677,6 @@ impl fungibles::Inspect for Pallet { asset_id: Self::AssetId, who: &T::AccountId, amount: Self::Balance, - _mint: bool, ) -> DepositConsequence { Self::deposit_consequence(who, asset_id, amount, &Self::accounts(who, asset_id)) } @@ -2169,8 +2168,8 @@ where fn reducible_balance(who: &T::AccountId, keep_alive: bool) -> Self::Balance { as fungibles::Inspect<_>>::reducible_balance(GetCurrencyId::get(), who, keep_alive) } - fn can_deposit(who: &T::AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence { - as fungibles::Inspect<_>>::can_deposit(GetCurrencyId::get(), who, amount, mint) + fn can_deposit(who: &T::AccountId, amount: Self::Balance) -> DepositConsequence { + as fungibles::Inspect<_>>::can_deposit(GetCurrencyId::get(), who, amount) } fn can_withdraw(who: &T::AccountId, amount: Self::Balance) -> WithdrawConsequence { as fungibles::Inspect<_>>::can_withdraw(GetCurrencyId::get(), who, amount) diff --git a/tokens/src/tests_fungibles.rs b/tokens/src/tests_fungibles.rs index 69b862165..2103ce1c6 100644 --- a/tokens/src/tests_fungibles.rs +++ b/tokens/src/tests_fungibles.rs @@ -19,7 +19,7 @@ fn fungibles_inspect_trait_should_work() { >::reducible_balance(DOT, &ALICE, true), 98 ); - assert_ok!(>::can_deposit(DOT, &ALICE, 1, false).into_result()); + assert_ok!(>::can_deposit(DOT, &ALICE, 1).into_result()); assert_ok!(>::can_withdraw(DOT, &ALICE, 1).into_result()); }); }