fix: remove duplicate event of pallet_balances (#933)

* fix: remove duplicate event of pallet_balances

https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/tokens/currency.rs#L158
https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L1647

Since 0.9.12 of substrate, there is no need for a separate of balances event in runtime.

* Update impls.rs
This commit is contained in:
WMQ
2022-01-25 19:50:00 +08:00
committed by GitHub
parent e802dcad1d
commit cbae45a27d
@@ -44,13 +44,8 @@ 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 staking_pot = <pallet_collator_selection::Pallet<R>>::account_id(); let staking_pot = <pallet_collator_selection::Pallet<R>>::account_id();
<pallet_balances::Pallet<R>>::resolve_creating(&staking_pot, amount); <pallet_balances::Pallet<R>>::resolve_creating(&staking_pot, amount);
<frame_system::Pallet<R>>::deposit_event(pallet_balances::Event::Deposit {
who: staking_pot,
amount: numeric_amount,
});
} }
} }