remove duplicate Deposit from OnUnbalanced implementation (#4180)

closes https://github.com/paritytech/polkadot/issues/4133
This commit is contained in:
Alexander Popiak
2021-10-30 18:39:04 +02:00
committed by GitHub
parent 0b5d1802a1
commit dd695f7ace
-6
View File
@@ -29,16 +29,10 @@ where
<R as frame_system::Config>::Event: From<pallet_balances::Event<R>>,
{
fn on_nonzero_unbalanced(amount: NegativeImbalance<R>) {
let numeric_amount = amount.peek();
let author = <pallet_authorship::Pallet<R>>::author();
<pallet_balances::Pallet<R>>::resolve_creating(
&<pallet_authorship::Pallet<R>>::author(),
amount,
);
<frame_system::Pallet<R>>::deposit_event(pallet_balances::Event::Deposit(
author,
numeric_amount,
));
}
}