Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

AccountTouch trait: deposit_required accepts asset id #14147

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frame/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
4 changes: 2 additions & 2 deletions frame/support/src/traits/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down