Fix tests

This commit is contained in:
Amir Bandeali
2019-09-23 15:55:28 -07:00
parent 62663ed6d2
commit 5ce988957f
3 changed files with 11 additions and 7 deletions

View File

@@ -241,9 +241,7 @@ export class FinalizerActor extends BaseActor {
this._stakingApiWrapper.stakingContract.getActiveStakingPoolThisEpoch.callAsync(poolId),
),
);
const totalRewards = await this._stakingApiWrapper.utils.getEthAndWethBalanceOfAsync(
this._stakingApiWrapper.stakingContract.address,
);
const totalRewards = await this._stakingApiWrapper.stakingContract.getAvailableBalance.callAsync();
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)) {