check can_dec_provider when transfer allow death (#9411)

This commit is contained in:
wangjj9219
2021-07-28 00:59:34 +08:00
committed by GitHub
parent 23e8088c1c
commit 32fe61306b
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -1484,7 +1484,7 @@ where
// may not even be a provider.
let allow_death = existence_requirement == ExistenceRequirement::AllowDeath;
let allow_death =
allow_death && !system::Pallet::<T>::is_provider_required(transactor);
allow_death && system::Pallet::<T>::can_dec_provider(transactor);
ensure!(
allow_death || from_account.total() >= ed,
Error::<T, I>::KeepAlive