Companion for #10403: Remove Default for AccountId (#842)

* author is Some

* Bump

* Lockfile

* Fixes

* Fixes

* Fixes

* Fixes

* Bump

* Update Cargo.lock

* bump substrate and polkadot

* fmt

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Gavin Wood
2021-12-14 10:07:51 +01:00
committed by GitHub
parent 8a2a86655f
commit 0f10bb0aea
8 changed files with 275 additions and 260 deletions
@@ -84,9 +84,10 @@ where
From<polkadot_primitives::v1::AccountId> + Into<polkadot_primitives::v1::AccountId>,
{
fn handle_credit(credit: CreditOf<AccountIdOf<R>, pallet_assets::Pallet<R>>) {
let author = pallet_authorship::Pallet::<R>::author();
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
let _ = pallet_assets::Pallet::<R>::resolve(&author, credit);
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
let _ = pallet_assets::Pallet::<R>::resolve(&author, credit);
}
}
}