Adjust logic location for skipRewards (#7795)
This commit is contained in:
parent
f3e9f2cd00
commit
53ceec4f30
@ -131,12 +131,12 @@ function extractSingle (api: ApiPromise, allAccounts: string[], derive: DeriveSt
|
||||
? [exposure.own.unwrap(), exposure.total.unwrap()]
|
||||
: [BN_ZERO, BN_ZERO];
|
||||
|
||||
if (bondTotal.isZero()) {
|
||||
const skipRewards = bondTotal.isZero();
|
||||
|
||||
if (skipRewards) {
|
||||
bondTotal = bondOwn = stakingLedger.total?.unwrap() || BN_ZERO;
|
||||
}
|
||||
|
||||
const skipRewards = bondTotal.isZero();
|
||||
|
||||
// some overrides (e.g. Darwinia Crab) does not have the value field in IndividualExposure
|
||||
const minNominated = (exposure.others || []).reduce((min: BN, { value = api.createType('Compact<Balance>') }): BN => {
|
||||
const actual = value.unwrap();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user