@0x/contracts-staking: Remove getTotalBalance() function.

`@0x/contracts-staking`: Fix linter errors.
This commit is contained in:
Lawrence Forman
2019-09-23 14:21:18 -04:00
parent 196cc4313f
commit 3883297991
4 changed files with 13 additions and 18 deletions

View File

@@ -241,7 +241,9 @@ export class FinalizerActor extends BaseActor {
this._stakingApiWrapper.stakingContract.getActiveStakingPoolThisEpoch.callAsync(poolId),
),
);
const totalRewards = await this._stakingApiWrapper.stakingContract.getTotalBalance.callAsync();
const totalRewards = await this._stakingApiWrapper.utils.getEthAndWethBalanceOfAsync(
this._stakingApiWrapper.stakingContract.address,
);
const totalFeesCollected = BigNumber.sum(...activePools.map(p => p.feesCollected));
const totalWeightedStake = BigNumber.sum(...activePools.map(p => p.weightedStake));
if (totalRewards.eq(0) || totalFeesCollected.eq(0) || totalWeightedStake.eq(0)) {