Fix tests
This commit is contained in:
parent
62663ed6d2
commit
5ce988957f
@ -126,9 +126,10 @@ contract MixinExchangeFees is
|
||||
activePoolsThisEpoch[poolId] = pool;
|
||||
}
|
||||
|
||||
/// @dev Returns the total balance of this contract, including WETH.
|
||||
/// @dev Returns the total balance of this contract, including WETH,
|
||||
/// minus any WETH that has been reserved for rewards.
|
||||
/// @return totalBalance Total balance.
|
||||
function getTotalBalance()
|
||||
function getAvailableBalance()
|
||||
external
|
||||
view
|
||||
returns (uint256 totalBalance)
|
||||
|
@ -42,9 +42,14 @@ contract TestStakingNoWETH is
|
||||
return true;
|
||||
}
|
||||
|
||||
function _wrapEthAndGetWethBalance()
|
||||
function _wrapEth()
|
||||
internal
|
||||
returns (uint256 balance)
|
||||
{}
|
||||
|
||||
function _getAvailableWethBalance()
|
||||
internal
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
return address(this).balance;
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user