Fix tests
This commit is contained in:
parent
62663ed6d2
commit
5ce988957f
@ -126,9 +126,10 @@ contract MixinExchangeFees is
|
|||||||
activePoolsThisEpoch[poolId] = pool;
|
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.
|
/// @return totalBalance Total balance.
|
||||||
function getTotalBalance()
|
function getAvailableBalance()
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
returns (uint256 totalBalance)
|
returns (uint256 totalBalance)
|
||||||
|
@ -42,9 +42,14 @@ contract TestStakingNoWETH is
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _wrapEthAndGetWethBalance()
|
function _wrapEth()
|
||||||
internal
|
internal
|
||||||
returns (uint256 balance)
|
{}
|
||||||
|
|
||||||
|
function _getAvailableWethBalance()
|
||||||
|
internal
|
||||||
|
view
|
||||||
|
returns (uint256)
|
||||||
{
|
{
|
||||||
return address(this).balance;
|
return address(this).balance;
|
||||||
}
|
}
|
||||||
|
@ -241,9 +241,7 @@ export class FinalizerActor extends BaseActor {
|
|||||||
this._stakingApiWrapper.stakingContract.getActiveStakingPoolThisEpoch.callAsync(poolId),
|
this._stakingApiWrapper.stakingContract.getActiveStakingPoolThisEpoch.callAsync(poolId),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
const totalRewards = await this._stakingApiWrapper.utils.getEthAndWethBalanceOfAsync(
|
const totalRewards = await this._stakingApiWrapper.stakingContract.getAvailableBalance.callAsync();
|
||||||
this._stakingApiWrapper.stakingContract.address,
|
|
||||||
);
|
|
||||||
const totalFeesCollected = BigNumber.sum(...activePools.map(p => p.feesCollected));
|
const totalFeesCollected = BigNumber.sum(...activePools.map(p => p.feesCollected));
|
||||||
const totalWeightedStake = BigNumber.sum(...activePools.map(p => p.weightedStake));
|
const totalWeightedStake = BigNumber.sum(...activePools.map(p => p.weightedStake));
|
||||||
if (totalRewards.eq(0) || totalFeesCollected.eq(0) || totalWeightedStake.eq(0)) {
|
if (totalRewards.eq(0) || totalFeesCollected.eq(0) || totalWeightedStake.eq(0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user