Fix build and tests

This commit is contained in:
Amir Bandeali
2019-09-17 15:31:19 -07:00
parent 336e8bafb4
commit 9b2672841d
4 changed files with 7 additions and 7 deletions

View File

@@ -165,7 +165,7 @@ export class FinalizerActor extends BaseActor {
const operatorShareByPoolId: OperatorShareByPoolId = {};
for (const poolId of poolIds) {
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
const operatorShare = new BigNumber(pool[1]);
const operatorShare = new BigNumber(pool[0]);
operatorShareByPoolId[poolId] = operatorShare;
}
return operatorShareByPoolId;
@@ -181,8 +181,8 @@ export class FinalizerActor extends BaseActor {
private async _getRewardVaultBalanceAsync(poolId: string): Promise<RewardVaultBalance> {
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
const operatorBalance = pool[2];
const membersBalance = pool[3];
const operatorBalance = pool[1];
const membersBalance = pool[2];
return {
poolBalance: operatorBalance.plus(membersBalance),
operatorBalance,

View File

@@ -104,7 +104,7 @@ export class PoolOperatorActor extends BaseActor {
await txReceiptPromise;
// Check operator share
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
const decreasedOperatorShare = new BigNumber(pool[1]);
const decreasedOperatorShare = new BigNumber(pool[0]);
expect(decreasedOperatorShare, 'updated operator share').to.be.bignumber.equal(newOperatorShare);
}
}

View File

@@ -123,8 +123,8 @@ blockchainTests.resets('Testing Rewards', env => {
: ZERO,
};
const pool = await stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
const operatorBalance = pool[2];
const membersBalance = pool[3];
const operatorBalance = pool[1];
const membersBalance = pool[2];
const poolBalances = { poolBalance: operatorBalance.plus(membersBalance), operatorBalance, membersBalance };
const finalEndBalancesAsArray = await Promise.all([
// staker 1

View File

@@ -46,7 +46,7 @@ blockchainTests.resets('Stake Statuses', env => {
await stakingApiWrapper.utils.createStakingPoolAsync(poolOperator, 4, false),
await stakingApiWrapper.utils.createStakingPoolAsync(poolOperator, 5, false),
]);
unusedPoolId = await stakingApiWrapper.stakingContract.getNextStakingPoolId.callAsync();
unusedPoolId = await stakingApiWrapper.stakingContract.nextPoolId.callAsync();
});
describe('Stake', () => {
it('should successfully stake zero ZRX', async () => {