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

Commit

Permalink
it's always false... (#13330)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilescope authored Jun 9, 2023
1 parent ff3be27 commit 6f7ec53
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frame/assets/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,8 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
}
}

let is_provider = false;
let is_required = is_provider && !frame_system::Pallet::<T>::can_dec_provider(who);
let must_keep_alive = keep_alive || is_required;

if rest < details.min_balance {
if must_keep_alive {
if keep_alive {
WouldDie
} else {
ReducedToZero(rest)
Expand Down Expand Up @@ -231,9 +227,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
frozen.checked_add(&details.min_balance).ok_or(ArithmeticError::Overflow)?;
account.balance.saturating_sub(required)
} else {
let is_provider = false;
let is_required = is_provider && !frame_system::Pallet::<T>::can_dec_provider(who);
if keep_alive || is_required {
if keep_alive {
// We want to keep the account around.
account.balance.saturating_sub(details.min_balance)
} else {
Expand Down

0 comments on commit 6f7ec53

Please sign in to comment.