mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Do not allow zero Existential Deposit when using Balances (#4894)
* Add non-zero ed check on Balances genesis * Update ED from 0 to 1 * bump impl * bump spec * Found remove more ed = 0 * Fix some contract tests * Use ctx.overlay.set_balance for contracts * Fix staking test * Remove obsolete logic * Allow death of payout account in society * Update frame/balances/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Dont create genesis balances if balance is zero in transaction payment pallet Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Gavin Wood <github@gavwood.com>
This commit is contained in:
@@ -263,7 +263,7 @@ use frame_support::{decl_error, decl_module, decl_storage, decl_event, ensure, d
|
||||
use frame_support::weights::SimpleDispatchInfo;
|
||||
use frame_support::traits::{
|
||||
Currency, ReservableCurrency, Randomness, Get, ChangeMembers,
|
||||
ExistenceRequirement::{KeepAlive, AllowDeath},
|
||||
ExistenceRequirement::AllowDeath,
|
||||
};
|
||||
use frame_system::{self as system, ensure_signed, ensure_root};
|
||||
|
||||
@@ -788,7 +788,7 @@ decl_module! {
|
||||
let mut payouts = <Payouts<T, I>>::get(&who);
|
||||
if let Some((when, amount)) = payouts.first() {
|
||||
if when <= &<system::Module<T>>::block_number() {
|
||||
T::Currency::transfer(&Self::payouts(), &who, *amount, KeepAlive)?;
|
||||
T::Currency::transfer(&Self::payouts(), &who, *amount, AllowDeath)?;
|
||||
payouts.remove(0);
|
||||
if payouts.is_empty() {
|
||||
<Payouts<T, I>>::remove(&who);
|
||||
|
||||
Reference in New Issue
Block a user