Unverified Commit fb730e41 authored by Alexander Popiak's avatar Alexander Popiak Committed by GitHub
Browse files

remove duplicate Deposit from OnUnbalanced implementation (#4180)

closes https://github.com/paritytech/polkadot/issues/4133
parent ad019ddc
Pipeline #164076 passed with stages
in 38 minutes and 9 seconds
...@@ -29,16 +29,10 @@ where ...@@ -29,16 +29,10 @@ where
<R as frame_system::Config>::Event: From<pallet_balances::Event<R>>, <R as frame_system::Config>::Event: From<pallet_balances::Event<R>>,
{ {
fn on_nonzero_unbalanced(amount: NegativeImbalance<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_balances::Pallet<R>>::resolve_creating(
&<pallet_authorship::Pallet<R>>::author(), &<pallet_authorship::Pallet<R>>::author(),
amount, amount,
); );
<frame_system::Pallet<R>>::deposit_event(pallet_balances::Event::Deposit(
author,
numeric_amount,
));
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment