Don't return misleading result with PostInfo in proxy-pallet (#9426)

also autoformatting two unrelated files

fixes #9421
This commit is contained in:
Falco Hirschenberger authored and GitHub committed 2021-07-24 18:00:29 +00:00
1 parent 4e653bfa3c
commit b7dc3bc6f2
3 files changed
+16 -17

No files matched your search

+1 -2
View File
@@ -2365,8 +2365,7 @@ impl<T: Config> Pallet<T> {
})?;
let controller = Self::bonded(&validator_stash).ok_or_else(|| {
Error::<T>::NotStash
.with_weight(T::WeightInfo::payout_stakers_alive_staked(0))
Error::<T>::NotStash.with_weight(T::WeightInfo::payout_stakers_alive_staked(0))
})?;
let mut ledger = <Ledger<T>>::get(&controller).ok_or(Error::<T>::NotController)?;