From d06ed872790bed3cd85ddaeb2c53e22b3042f692 Mon Sep 17 00:00:00 2001 From: muharem Date: Mon, 15 May 2023 16:27:00 +0200 Subject: [PATCH] AccountTouch: deposit_required requires asset id --- frame/assets/src/lib.rs | 2 +- frame/support/src/traits/misc.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index c25f33ae3eaf9..33aacd9323bf2 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -1654,7 +1654,7 @@ pub mod pallet { impl, I: 'static> AccountTouch for Pallet { type Balance = DepositBalanceOf; - fn deposit_required() -> Self::Balance { + fn deposit_required(_: T::AssetId) -> Self::Balance { T::AssetAccountDeposit::get() } diff --git a/frame/support/src/traits/misc.rs b/frame/support/src/traits/misc.rs index e21fcfbb24179..a6f8c46d63951 100644 --- a/frame/support/src/traits/misc.rs +++ b/frame/support/src/traits/misc.rs @@ -1160,8 +1160,8 @@ pub trait AccountTouch { /// 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;