Skip to content

Commit 34f50fc

Browse files
committed
remove mint param
1 parent fa97751 commit 34f50fc

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tokens/src/impls.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ where
4848
}
4949
}
5050

51-
fn can_deposit(asset: Self::AssetId, who: &AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence {
51+
fn can_deposit(asset: Self::AssetId, who: &AccountId, amount: Self::Balance) -> DepositConsequence {
5252
if TestKey::contains(&asset) {
53-
A::can_deposit(who, amount, mint)
53+
A::can_deposit(who, amount)
5454
} else {
55-
B::can_deposit(asset, who, amount, mint)
55+
B::can_deposit(asset, who, amount)
5656
}
5757
}
5858

@@ -156,12 +156,11 @@ where
156156
)
157157
}
158158

159-
fn can_deposit(who: &AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence {
159+
fn can_deposit(who: &AccountId, amount: Self::Balance) -> DepositConsequence {
160160
T::can_deposit(
161161
GetCurrencyId::get(),
162162
who,
163163
C::convert_balance_back(amount, GetCurrencyId::get()),
164-
mint,
165164
)
166165
}
167166

tokens/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,6 @@ impl<T: Config> fungibles::Inspect<T::AccountId> for Pallet<T> {
16771677
asset_id: Self::AssetId,
16781678
who: &T::AccountId,
16791679
amount: Self::Balance,
1680-
_mint: bool,
16811680
) -> DepositConsequence {
16821681
Self::deposit_consequence(who, asset_id, amount, &Self::accounts(who, asset_id))
16831682
}
@@ -2169,8 +2168,8 @@ where
21692168
fn reducible_balance(who: &T::AccountId, keep_alive: bool) -> Self::Balance {
21702169
<Pallet<T> as fungibles::Inspect<_>>::reducible_balance(GetCurrencyId::get(), who, keep_alive)
21712170
}
2172-
fn can_deposit(who: &T::AccountId, amount: Self::Balance, mint: bool) -> DepositConsequence {
2173-
<Pallet<T> as fungibles::Inspect<_>>::can_deposit(GetCurrencyId::get(), who, amount, mint)
2171+
fn can_deposit(who: &T::AccountId, amount: Self::Balance) -> DepositConsequence {
2172+
<Pallet<T> as fungibles::Inspect<_>>::can_deposit(GetCurrencyId::get(), who, amount)
21742173
}
21752174
fn can_withdraw(who: &T::AccountId, amount: Self::Balance) -> WithdrawConsequence<Self::Balance> {
21762175
<Pallet<T> as fungibles::Inspect<_>>::can_withdraw(GetCurrencyId::get(), who, amount)

tokens/src/tests_fungibles.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn fungibles_inspect_trait_should_work() {
1919
<Tokens as fungibles::Inspect<_>>::reducible_balance(DOT, &ALICE, true),
2020
98
2121
);
22-
assert_ok!(<Tokens as fungibles::Inspect<_>>::can_deposit(DOT, &ALICE, 1, false).into_result());
22+
assert_ok!(<Tokens as fungibles::Inspect<_>>::can_deposit(DOT, &ALICE, 1).into_result());
2323
assert_ok!(<Tokens as fungibles::Inspect<_>>::can_withdraw(DOT, &ALICE, 1).into_result());
2424
});
2525
}

0 commit comments

Comments
 (0)