Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix: remove duplicate event of pallet_balances (#933)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wangminqi authored Jan 25, 2022
1 parent fd14576 commit e25e21f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions polkadot-parachains/parachains-common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ 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 staking_pot = <pallet_collator_selection::Pallet<R>>::account_id();
<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,
});
}
}

Expand Down

0 comments on commit e25e21f

Please sign in to comment.