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
2021-07-24 20:00:29 +02:00
committed by GitHub
parent 4e653bfa3c
commit b7dc3bc6f2
3 changed files with 16 additions and 17 deletions
+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)?;