Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Open
Changes from 2 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
6 changes: 6 additions & 0 deletions frame/balances/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,12 @@ pub mod pallet {
let existential_deposit = Self::ed();

let wipeout = new_free < existential_deposit;
debug_assert!(
!wipeout || new_free.is_zero(),
"Attempt to force balance to be {:?} but this is less than ED {:?}",
new_free,
existential_deposit
);
let new_free = if wipeout { Zero::zero() } else { new_free };

// First we try to modify the account's balance to the forced balance.
Expand Down