adapt Darwinia, Crab Network types (#3498)

This commit is contained in:
WoeOm
2021-05-06 13:03:16 +02:00
committed by GitHub
parent 60bc384d22
commit 0de39e4c52
2 changed files with 3 additions and 3 deletions
@@ -28,7 +28,7 @@ function parseRewards (api: ApiInterfaceRx, stashId: AccountId, [erasPoints, era
Object.entries(eraValidators).forEach(([validatorId, exposure]): void => {
const valPoints = allValPoints[validatorId] || BN_ZERO;
const valComm = allValPrefs[validatorId]?.commission.unwrap() || BN_ZERO;
const expTotal = exposure.total.unwrap();
const expTotal = exposure.total?.unwrap() || BN_ZERO;
let avail = BN_ZERO;
let value: BN | undefined;