From 0a105eed6f74febb037294bbca338a8337c84468 Mon Sep 17 00:00:00 2001 From: Muharem Ismailov <ismailov.m.h@gmail.com> Date: Mon, 15 May 2023 18:08:07 +0200 Subject: [PATCH] AccountTouch: deposit_required requires asset id (#14147) --- substrate/frame/assets/src/lib.rs | 2 +- substrate/frame/support/src/traits/misc.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/assets/src/lib.rs b/substrate/frame/assets/src/lib.rs index c25f33ae3ea..33aacd9323b 100644 --- a/substrate/frame/assets/src/lib.rs +++ b/substrate/frame/assets/src/lib.rs @@ -1654,7 +1654,7 @@ pub mod pallet { impl<T: Config<I>, I: 'static> AccountTouch<T::AssetId, T::AccountId> for Pallet<T, I> { type Balance = DepositBalanceOf<T, I>; - fn deposit_required() -> Self::Balance { + fn deposit_required(_: T::AssetId) -> Self::Balance { T::AssetAccountDeposit::get() } diff --git a/substrate/frame/support/src/traits/misc.rs b/substrate/frame/support/src/traits/misc.rs index e21fcfbb241..a6f8c46d639 100644 --- a/substrate/frame/support/src/traits/misc.rs +++ b/substrate/frame/support/src/traits/misc.rs @@ -1160,8 +1160,8 @@ pub trait AccountTouch<AssetId, AccountId> { /// The type for currency units of the deposit. type Balance; - /// The deposit amount of a native currency required for creating an asset account. - fn deposit_required() -> Self::Balance; + /// The deposit amount of a native currency required for creating an account of the `asset`. + fn deposit_required(asset: AssetId) -> Self::Balance; /// Create an account for `who` of the `asset` with a deposit taken from the `depositor`. fn touch(asset: AssetId, who: AccountId, depositor: AccountId) -> DispatchResult; -- GitLab