Unverified Commit b5e8f565 authored by Andrew Jones's avatar Andrew Jones Committed by GitHub
Browse files

Companion for #7936: Migrate pallet-balances to pallet attribute macro (#2331)

* Fix up balances Events

* "Update Substrate"

* Update substrate

Co-authored-by: parity-processbot <>
parent c3c739ab
Pipeline #123710 passed with stages
in 31 minutes and 46 seconds
This diff is collapsed.
......@@ -26,17 +26,13 @@ where
R: pallet_balances::Config + pallet_authorship::Config,
<R as frame_system::Config>::AccountId: From<primitives::v1::AccountId>,
<R as frame_system::Config>::AccountId: Into<primitives::v1::AccountId>,
<R as frame_system::Config>::Event: From<pallet_balances::RawEvent<
<R as frame_system::Config>::AccountId,
<R as pallet_balances::Config>::Balance,
pallet_balances::DefaultInstance>
>,
<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::Module<R>>::author();
<pallet_balances::Module<R>>::resolve_creating(&<pallet_authorship::Module<R>>::author(), amount);
<frame_system::Module<R>>::deposit_event(pallet_balances::RawEvent::Deposit(author, numeric_amount));
<frame_system::Module<R>>::deposit_event(pallet_balances::Event::Deposit(author, numeric_amount));
}
}
......@@ -47,11 +43,7 @@ where
pallet_treasury::Module<R>: OnUnbalanced<NegativeImbalance<R>>,
<R as frame_system::Config>::AccountId: From<primitives::v1::AccountId>,
<R as frame_system::Config>::AccountId: Into<primitives::v1::AccountId>,
<R as frame_system::Config>::Event: From<pallet_balances::RawEvent<
<R as frame_system::Config>::AccountId,
<R as pallet_balances::Config>::Balance,
pallet_balances::DefaultInstance>
>,
<R as frame_system::Config>::Event: From<pallet_balances::Event<R>>,
{
fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item=NegativeImbalance<R>>) {
if let Some(fees) = fees_then_tips.next() {
......
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